aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-02-20 17:24:58 -0800
committerJakub Kicinski <kuba@kernel.org>2025-02-20 17:24:58 -0800
commit5225861b5c77db618d8f787bf53011fda36b9086 (patch)
tree251e5ed2c61173e205a481281e3c1b80afbbe157 /net/core/neighbour.c
parentaf_unix: Fix undefined 'other' error (diff)
parentnet: pktgen: fix access outside of user given buffer in pktgen_thread_write() (diff)
downloadwireguard-linux-5225861b5c77db618d8f787bf53011fda36b9086.tar.xz
wireguard-linux-5225861b5c77db618d8f787bf53011fda36b9086.zip
Merge branch 'some-pktgen-fixes-improvments-part-i'
Peter Seiderer says: ==================== Some pktgen fixes/improvments (part I) While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given buffer bounds (resulting in out-of-bounds access). This can be observed e.g. by the following simple test (sometimes the old/'longer' previous value is re-read from the buffer): $ echo add_device lo@0 > /proc/net/pktgen/kpktgend_0 $ echo "min_pkt_size 12345" > /proc/net/pktgen/lo\@0 && grep min_pkt_size /proc/net/pktgen/lo\@0 Params: count 1000 min_pkt_size: 12345 max_pkt_size: 0 Result: OK: min_pkt_size=12345 $ echo -n "min_pkt_size 123" > /proc/net/pktgen/lo\@0 && grep min_pkt_size /proc/net/pktgen/lo\@0 Params: count 1000 min_pkt_size: 12345 max_pkt_size: 0 Result: OK: min_pkt_size=12345 $ echo "min_pkt_size 123" > /proc/net/pktgen/lo\@0 && grep min_pkt_size /proc/net/pktgen/lo\@0 Params: count 1000 min_pkt_size: 123 max_pkt_size: 0 Result: OK: min_pkt_size=123 So fix the out-of-bounds access (and some minor findings) and add a simple proc_net_pktgen selftest... [1] https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernyshev@red-soft.ru/ [2] https://lore.kernel.org/netdev/20250109083039.14004-1-pchelkin@ispras.ru/ [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76201b5979768500bca362871db66d77cb4c225e ==================== Link: https://patch.msgid.link/20250219084527.20488-1-ps.report@gmx.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions