summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/108/socket/833
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
commitdee4dcba78baf712cab403d47d9db319ab7f95d6 (patch)
tree418478faf06786701a56268672f73d6b0b4eb239 /results/classifier/zero-shot/108/socket/833
parent4d9e26c0333abd39bdbd039dcdb30ed429c475ba (diff)
downloadqemu-analysis-dee4dcba78baf712cab403d47d9db319ab7f95d6.tar.gz
qemu-analysis-dee4dcba78baf712cab403d47d9db319ab7f95d6.zip
restructure results
Diffstat (limited to 'results/classifier/zero-shot/108/socket/833')
-rw-r--r--results/classifier/zero-shot/108/socket/83357
1 files changed, 57 insertions, 0 deletions
diff --git a/results/classifier/zero-shot/108/socket/833 b/results/classifier/zero-shot/108/socket/833
new file mode 100644
index 000000000..f440c9a0c
--- /dev/null
+++ b/results/classifier/zero-shot/108/socket/833
@@ -0,0 +1,57 @@
+socket: 0.983
+network: 0.942
+performance: 0.924
+device: 0.914
+graphic: 0.863
+PID: 0.818
+files: 0.815
+other: 0.813
+permissions: 0.808
+debug: 0.758
+vnc: 0.742
+boot: 0.674
+semantic: 0.594
+KVM: 0.473
+
+linux-user: sendmsg fails to send messages without iov
+Description of problem:
+When run via qemu `sendmsg` fails to send messages which contain a zero length `iov` but _do_ contain ancillary data. This works fine on plain Linux.
+
+A practical example: the `ell` library relies on this for setting the IV on a kernel crypto (`AF_ALG`) socket: https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/cipher.c#n526
+
+A message without data but only ancillary data is used to set the IV.
+Steps to reproduce:
+See [qemu_ancillary.c](/uploads/84ee20aa3b9178022847d6cd7fcf0048/qemu_ancillary.c) for a self contained testcase which sends two mesages (one with `msg_iovlen=0`, one with `msg_iovlen=1`).
+
+(Test case is to be considered GPL, as I've copied bits from `ell`)
+
+Native:
+```
+$ strace -esendmsg ./a.out 
+sendmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=NULL, msg_iovlen=0, msg_control=[{cmsg_len=36, cmsg_level=SOL_ALG, cmsg_type=0x2}], msg_controllen=40, msg_flags=0}, 0) = 0
+sendmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_control=[{cmsg_len=36, cmsg_level=SOL_ALG, cmsg_type=0x2}], msg_controllen=40, msg_flags=0}, 0) = 16
++++ exited with 0 +++
+```
+
+
+Qemu (observe missing sendmsg call):
+```
+$ strace -esendmsg ~/debug/qemu/build/qemu-x86_64 ./a.out 
+sendmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=16}], msg_iovlen=1, msg_control=[{cmsg_len=36, cmsg_level=SOL_ALG, cmsg_type=0x2}], msg_controllen=40, msg_flags=0}, 0) = 16
++++ exited with 0 +++
+```
+
+For a practical reproducer:
+
+1. Compile and run `ell`'s `test-cipher` test case:
+
+```
+$ ~/debug/qemu/build/qemu-x86_64 ./unit/test-cipher 
+TEST: unsupported
+TEST: aes
+TEST: aes_ctr
+test-cipher: unit/test-cipher.c:102: test_aes_ctr: Assertion `!r' failed.
+Aborted (core dumped)
+```
+
+A strace will look similar.