Skip to content

Commit ba68e07

Browse files
committed
feat: modify socket() seccomp flags
- seqpacket sockets necessitate a different flag set than whats currently in the seccomp rules. we need to add seqpacket with SOCK_CLOEXEC for testing to work Signed-off-by: aerosouund <aerosound161@gmail.com>
1 parent 7fc91ee commit ba68e07

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

resources/seccomp/aarch64-unknown-linux-musl.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,32 @@
323323
}
324324
]
325325
},
326+
{
327+
"syscall": "socket",
328+
"comment": "Called to open the vsock seqpacket UDS (SeqpacketConn::connect and SeqpacketListener::bind)",
329+
"args": [
330+
{
331+
"index": 0,
332+
"type": "dword",
333+
"op": "eq",
334+
"val": 1,
335+
"comment": "libc::AF_UNIX"
336+
},
337+
{
338+
"index": 1,
339+
"type": "dword",
340+
"op": "eq",
341+
"val": 524293,
342+
"comment": "libc::SOCK_SEQPACKET | libc::SOCK_CLOEXEC"
343+
},
344+
{
345+
"index": 2,
346+
"type": "dword",
347+
"op": "eq",
348+
"val": 0
349+
}
350+
]
351+
},
326352
{
327353
"syscall": "sendto",
328354
"comment": "Rust std uses it to write to unix socket"

resources/seccomp/x86_64-unknown-linux-musl.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,32 @@
323323
}
324324
]
325325
},
326+
{
327+
"syscall": "socket",
328+
"comment": "Called to open the vsock seqpacket UDS (SeqpacketConn::connect and SeqpacketListener::bind)",
329+
"args": [
330+
{
331+
"index": 0,
332+
"type": "dword",
333+
"op": "eq",
334+
"val": 1,
335+
"comment": "libc::AF_UNIX"
336+
},
337+
{
338+
"index": 1,
339+
"type": "dword",
340+
"op": "eq",
341+
"val": 524293,
342+
"comment": "libc::SOCK_SEQPACKET | libc::SOCK_CLOEXEC"
343+
},
344+
{
345+
"index": 2,
346+
"type": "dword",
347+
"op": "eq",
348+
"val": 0
349+
}
350+
]
351+
},
326352
{
327353
"syscall": "sendto",
328354
"comment": "Rust std uses it to write to unix socket"

0 commit comments

Comments
 (0)