android_kernel_motorola_sm6375/net/xfrm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sabrina Dubroca 401ad99a5a xfrm: validate new SA's prefixlen using SA family when sel.family is unset
[ Upstream commit 3f0ab59e6537c6a8f9e1b355b48f9c05a76e8563 ]

This expands the validation introduced in commit 07bf790895 ("xfrm:
Validate address prefix lengths in the xfrm selector.")

syzbot created an SA with
    usersa.sel.family = AF_UNSPEC
    usersa.sel.prefixlen_s = 128
    usersa.family = AF_INET

Because of the AF_UNSPEC selector, verify_newsa_info doesn't put
limits on prefixlen_{s,d}. But then copy_from_user_state sets
x->sel.family to usersa.family (AF_INET). Do the same conversion in
verify_newsa_info before validating prefixlen_{s,d}, since that's how
prefixlen is going to be used later on.

Reported-by: [email protected]
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: Antony Antony <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-11-08 16:20:52 +01:00
..
Kconfig
Makefile xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c 2023-08-30 16:27:16 +02:00
xfrm_algo.c
xfrm_device.c xfrm: enforce validity of offload input flags 2022-03-08 19:07:47 +01:00
xfrm_hash.c
xfrm_hash.h
xfrm_inout.h
xfrm_input.c xfrm: Preserve vlan tags for transport mode software GRO 2024-05-17 11:43:53 +02:00
xfrm_interface_core.c xfrm: interface: use DEV_STATS_INC() 2023-10-25 11:53:21 +02:00
xfrm_ipcomp.c xfrm: Update ipcomp_scratches with NULL when freed 2022-10-26 13:22:49 +02:00
xfrm_output.c
xfrm_policy.c net: fix __dst_negative_advice() race 2024-06-16 13:28:52 +02:00
xfrm_proc.c
xfrm_replay.c
xfrm_state.c xfrm: Allow transport-mode states with AF_UNSPEC selector 2023-03-22 13:28:03 +01:00
xfrm_sysctl.c
xfrm_user.c xfrm: validate new SA's prefixlen using SA family when sel.family is unset 2024-11-08 16:20:52 +01:00