]> www.infradead.org Git - users/jedix/linux-maple.git/commit
macsec: dynamically allocate space for sglist v4.1.12-105.0.20170705_2000
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 25 Apr 2017 17:08:18 +0000 (19:08 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 6 Jul 2017 03:49:18 +0000 (20:49 -0700)
commitd0431763158dc63d8a72ce4d1e708ad682ad157a
treee64ac856801a37704ff8a98ac55ba2e2d9312785
parent8d5b03bc78518237899953ba0adc888815fcb72a
macsec: dynamically allocate space for sglist

Orabug: 25953290
CVE: CVE-2017-7477

We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.

Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5294b83086cc1c35b4efeca03644cf9d12282e5b)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
drivers/net/macsec.c
drivers/net/macsec.c