Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a27b28bb authored by Tejaswi Tanikella's avatar Tejaswi Tanikella
Browse files

xfrm: Fix stack-out-of-bounds read on socket policy lookup.



When we do tunnel or beet mode, we pass saddr and daddr from the
template to xfrm_state_find(), this is ok. On transport mode,
we pass the addresses from the flowi, assuming that the IP
addresses (and address family) don't change during transformation.
This assumption is wrong in the IPv4 mapped IPv6 case, packet
is IPv4 and template is IPv6.

Fix this by catching address family missmatches of the policy
and the flow already before we do the lookup.

Change-Id: I4e3da03ed3b8f0cf0fdd01d5cdc8a69e9504240b
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Git-commit: ddc47e4404b58f03e98345398fb12d38fe291512
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarTejaswi Tanikella <tejaswit@codeaurora.org>
Acked-by: default avatarSharath Chandra Vurukala <sharathv@qti.qualcomm.com>
parent 11f2cc4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment