aboutsummaryrefslogtreecommitdiff
path: root/src/ip.h
AgeCommit message (Collapse)AuthorFilesLines
2023-05-16ip: Enforce strict aliasingAkihiko Odaki1-15/+6
Sometimes ipq were casted to ipasfrag, and the original and casted pointer were used simultaneously in ip_reass(). GCC 12.1.0 assumes these pointers are not aliases, and therefore incorrectly the pointed data will not be modified when it is actually modified with another pointer. To fix this problem, introduce a new type "ipas", which is a universal type denoting an entry in the assembly queue and contains union for specialization as queue head (frequently referred as "q" or "ipq" in the source code) or IP fragment ("f" or "ipf"). This bug was found by Alexander Bulekov when fuzzing QEMU: https://patchew.org/QEMU/20230129053316.1071513-1-alxndr@bu.edu/ The fixed test case is: fuzz/crash_449dd4ad72212627fe3245c875f79a7033cc5382 Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-28Fix bitfields order for MSVCSamuel Thibault1-2/+2
It uses a saner strictly "from low to high bit" rule.
2022-05-28Separate out SLIRP_PACKED to SLIRP_PACKED_BEGIN/ENDSamuel Thibault1-5/+10
Since msvc provides the support through push/pop pragmas.
2019-03-22slirp: clarify license of slirp files using SPDX: explicit BSDMarc-André Lureau1-0/+1
Add SPDX license identifier to clarify the license of files with explicit 3-clause BSD license header. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
2019-03-07slirp: move sources to src/ subdirectoryMarc-André Lureau1-0/+241
Prepare for making slirp/ a standalone project. Remove some useless includes while at it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>