]> git.ipfire.org Git - thirdparty/qemu.git/commit
rtl8139: avoid nested ifs in IP header parsing (CVE-2015-5165)
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Jul 2015 16:13:32 +0000 (17:13 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 4 Aug 2015 17:32:40 +0000 (12:32 -0500)
commit8dd45dcd83bd819e3fe9927e819ba9441b4f0ccc
tree364fd0fab0f5021b5cb83621b6e86403030c7673
parente750591c8abc0f68296f1afa9f3b9e678b4a28be
rtl8139: avoid nested ifs in IP header parsing (CVE-2015-5165)

Transmit offload needs to parse packet headers.  If header fields have
unexpected values the offload processing is skipped.

The code currently uses nested ifs because there is relatively little
input validation.  The next patches will add missing input validation
and a goto label is more appropriate to avoid deep if statement nesting.

Reported-by: 朱东海(启路) <donghai.zdh@alibaba-inc.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 39b8e7dcaf04cbdb926b478f825b160d852752b5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/rtl8139.c