android_kernel_motorola_sm6375/net/xfrm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ahmed S. Darwish a128e07b47 net: xfrm: Localize sequence counter per network namespace
[ Upstream commit e88add19f68191448427a6e4eb059664650a837f ]

A sequence counter write section must be serialized or its internal
state can get corrupted. The "xfrm_state_hash_generation" seqcount is
global, but its write serialization lock (net->xfrm.xfrm_state_lock) is
instantiated per network namespace. The write protection is thus
insufficient.

To provide full protection, localize the sequence counter per network
namespace instead. This should be safe as both the seqcount read and
write sections access data exclusively within the network namespace. It
also lays the foundation for transforming "xfrm_state_hash_generation"
data type from seqcount_t to seqcount_LOCKNAME_t in further commits.

Fixes: b65e3d7be0 ("xfrm: state: add sequence count to detect hash resizes")
Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-04-14 08:24:13 +02:00
..
Kconfig
Makefile
xfrm_algo.c
xfrm_device.c xfrm: Fix double ESP trailer insertion in IPsec crypto offload. 2020-06-30 15:36:53 -04:00
xfrm_hash.c
xfrm_hash.h
xfrm_inout.h
xfrm_input.c xfrm: Fix oops in xfrm_replay_advance_bmp 2021-02-03 23:25:59 +01:00
xfrm_interface.c xfrm: interface: fix ipv4 pmtu check to honor ip header df 2021-04-14 08:24:13 +02:00
xfrm_ipcomp.c
xfrm_output.c xfrm: fix a NULL-ptr deref in xfrm_local_error 2020-06-03 08:21:33 +02:00
xfrm_policy.c xfrm: Fix wraparound in xfrm_policy_addr_delta() 2021-02-03 23:25:59 +01:00
xfrm_proc.c
xfrm_replay.c
xfrm_state.c net: xfrm: Localize sequence counter per network namespace 2021-04-14 08:24:13 +02:00
xfrm_sysctl.c
xfrm_user.c xfrm: policy: match with both mark and mask on user interfaces 2020-08-05 09:59:44 +02:00