aboutgitcodebugslistschat
path: root/test
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-24 19:54:18 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-12-06 07:42:07 +0100
commit6af7ee74cf8baca069ae948e70e62eae24c1f93b (patch)
tree145f2d3f815afaadb216ae7665df581145775f8d /test
parent34764ea4f35867e600b7ab7015588f38a1678532 (diff)
downloadpasst-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar.gz
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar.bz2
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar.lz
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar.xz
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.tar.zst
passt-6af7ee74cf8baca069ae948e70e62eae24c1f93b.zip
udp: Fix incorrect use of IPv6 mh buffers in IPv4 path
udp_sock_handler() incorrectly uses udp6_l2_mh_tap[] on the IPv4 path. In fact this is harmless because this assignment is redundant (the 0th entry msg_hdr will always point to the 0th iov entry for both IPv4 and IPv6 and won't change). There is also an incorrect usage of udp6_l2_mh_tap[] in udp_sock_fill_data_v4. This one can cause real problems, because we'll use stale iov_len values if we send multiple messages to the qemu socket. Most of the time that will be relatively harmless - we're likely to either drop UDP packets, or send duplicates. However, if the stale iov_len we use ends up referencing an uninitialized buffer we could desynchronize the qemu stream socket. Correct both these bugs. The UDP6 path appears to be correct, but it does have some comments that incorrectly reference the IPv4 versions, so fix those as well. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions