Re: [PATCH net 3/6] ipv6: fix error handling in forwarding sysctl
From: Nicolas Dichtel <hidden>
Date: 2026-06-19 09:34:46
From: Nicolas Dichtel <hidden>
Date: 2026-06-19 09:34:46
Le 18/06/2026 à 18:22, Fernando Fernandez Mancera a écrit :
When writing to the forwarding sysctl, if proc_dointvec() fails to parse
the input, it returns a negative error code. The current implementation
is overwriting that error for write operations.
This results in a silent failure, it returns a successful write although
the configuration was not modified at all. When modifying the "all"
variant it can also modify the configuration of existing interfaces to
the wrong value.
Fix this by checking the return value of proc_dointvec() and returning
early on failure.
Fixes: b325fddb7f86 ("ipv6: Fix sysctl unregistration deadlock")The bug existed before the git era.
Maybe
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")