Commit fd63f18
ipv6: prevent possible UaF in addrconf_permanent_addr()
The mentioned helper try to warn the user about an exceptional
condition, but the message is delivered too late, accessing the ipv6
after its possible deletion.
Reorder the statement to avoid the possible UaF; while at it, place the
warning outside the idev->lock as it needs no protection.
Reported-by: Jakub Kicinski <[email protected]>
Closes: https://sashiko.dev/#/patchset/8c8bfe2e1a324e501f0e15fef404a77443fd8caf.1774365668.git.pabeni%40redhat.com
Fixes: f1705ec ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Paolo Abeni <[email protected]>
Link: https://patch.msgid.link/ef973c3a8cb4f8f1787ed469f3e5391b9fe95aa0.1774601542.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <[email protected]>1 parent dc9e9d6 commit fd63f18
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3625 | 3625 | | |
3626 | 3626 | | |
3627 | 3627 | | |
3628 | | - | |
3629 | | - | |
3630 | | - | |
3631 | 3628 | | |
3632 | 3629 | | |
3633 | 3630 | | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
3634 | 3634 | | |
3635 | 3635 | | |
3636 | 3636 | | |
| |||
0 commit comments