]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipv6: fix state corruption during proxy_ndp sysctl restart
authorFernando Fernandez Mancera <fmancera@suse.de>
Mon, 22 Jun 2026 13:08:56 +0000 (15:08 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 Jun 2026 02:12:47 +0000 (19:12 -0700)
commit6a1b50e585f033f3e201f42a18b37f070095fb80
treee9751c67bb7c7ab2c49971eb763ca9ebc96acdd8
parent3e0e51c0ee1d08cc9d48dc17f3248d5b31cf8066
ipv6: fix state corruption during proxy_ndp sysctl restart

When handling proxy_ndp, if rtnl_net_trylock() fails, the operation is
retried but as the value was already modified by the initial
proc_dointvec() call, the restarted syscall will read the newly modified
value as the 'old' state.

Fix this by taking the RTNL lock before parsing the input value if the
operation is a write.

Fixes: c92d5491a6d9 ("netconf: add support for IPv6 proxy_ndp")
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260622130857.5115-6-fmancera@suse.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/addrconf.c