]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: fix buffer overflow in af_xdp_umem_create()
authorAnastasia Belova <nabelova31@gmail.com>
Mon, 2 Jun 2025 08:57:17 +0000 (11:57 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 15 Jul 2025 20:06:36 +0000 (23:06 +0300)
commit6624ff39720c954081706822da15bc806ea4c318
treeb95ea87885d6900acd9811c956c959c4fad851a8
parenta655b6548fe2196031a3f325c5a4df7df65ff4cd
net: fix buffer overflow in af_xdp_umem_create()

s->pool has n_descs elements so maximum i should be
n_descs - 1. Fix the upper bound.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: cb039ef3d9 ("net: add initial support for AF_XDP network backend")
Cc: qemu-stable@nongnu.org
Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Anastasia Belova <nabelova31@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 110d0fa2d4d1f754242f6775baec43776a9adb35)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
net/af-xdp.c