]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm4: Fix uninitialized memory read in _decode_session4
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 26 Feb 2019 06:04:50 +0000 (07:04 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 2 Apr 2019 06:18:39 +0000 (08:18 +0200)
commitebffdb9e99a2e9e2b3f412bd74b6b219131f0f03
tree728af98f0cc36df61525fc5958f188d825fc5bc6
parent0ec639422a2e63131682af6bcff0385df9ee65fe
xfrm4: Fix uninitialized memory read in _decode_session4

We currently don't reload pointers pointing into skb header
after doing pskb_may_pull() in _decode_session4(). So in case
pskb_may_pull() changed the pointers, we read from random
memory. Fix this by putting all the needed infos on the
stack, so that we don't need to access the header pointers
after doing pskb_may_pull().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/xfrm4_policy.c