DivestOS/Patches/Linux_CVEs/CVE-2017-7308/3.18/0.patch
2017-10-29 22:14:37 -04:00

16 lines
541 B
Diff

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index bcd8142..86b3e2f 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3808,8 +3808,8 @@
if (unlikely(req->tp_block_size & (PAGE_SIZE - 1)))
goto out;
if (po->tp_version >= TPACKET_V3 &&
- (int)(req->tp_block_size -
- BLK_PLUS_PRIV(req_u->req3.tp_sizeof_priv)) <= 0)
+ req->tp_block_size <=
+ BLK_PLUS_PRIV((u64)req_u->req3.tp_sizeof_priv))
goto out;
if (unlikely(req->tp_frame_size < po->tp_hdrlen +
po->tp_reserve))