pipewire/spa
Demi Marie Obenour 0227a30bcf spa: Bounds-check pointers before dereferencing them
Add a new overflow-safe function to check if region p2 of size s2 fits
completely in p1 of size s1 and, if it does, return the amount of bytes
in p1 that come after the end of p2.  Use this to bounds check the pod
iterators while ensuring that the pointer is bounds checked before being
dereferenced.

The spa_pod*_next() functions can still create an out-of-bounds pointer,
but this will not be dereferenced.  Fixing this requires either
additional complexity in these functions or forbidding POD structs,
objects, and sequences that have a length that is not a multiple of 8
bytes.

Fixes: 92ac9a355f ("spa: add spa_ptrinside")
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2023-12-26 16:05:24 +00:00
..
examples meson.build: fix compile with -Dexamples=disabled 2023-11-28 10:18:25 +00:00
include spa: Bounds-check pointers before dereferencing them 2023-12-26 16:05:24 +00:00
plugins bluez5: update bluez-hardware.conf to ignore sbc-mq on Primark earbud 2023-12-26 16:02:22 +00:00
tests Add GNU/Hurd support 2023-09-24 15:11:52 +00:00
tools treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
meson.build spa/meson.build: Look for udev rules in /usr by default 2023-12-02 10:08:12 +01:00