]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commit
net: add checks to validate ring buffer pointers(CVE-2015-5279)
authorP J P <pjp@fedoraproject.org>
Tue, 15 Sep 2015 11:10:49 +0000 (16:40 +0530)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 15 Sep 2015 14:04:37 +0000 (14:04 +0000)
commit49404164189c6b91dfe3f96f70ae007a5a560e94
treed1df0eda02c2ed09e16e31a958f692f5bd85f630
parentabb0a6d538474facd8fe4ccefb9a731325cd8fd5
net: add checks to validate ring buffer pointers(CVE-2015-5279)

Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152)
bytes to process network packets. While receiving packets
via ne2000_receive() routine, a local 'index' variable
could exceed the ring buffer size, which could lead to a
memory buffer overflow. Added other checks at initialisation.

upstream-commit-id: 9bbdbc66e5765068dce76e9269dce4547afd8ad4

Reported-by: Qinghao Tang <luodalongde@gmail.com>
Signed-off-by: P J P <pjp@fedoraproject.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/net/ne2000.c