]> git.ipfire.org Git - thirdparty/systemd.git/commit
network/sysctl-monitor: fix use-after-free
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 16 Sep 2024 06:08:36 +0000 (15:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 16 Sep 2024 06:12:47 +0000 (15:12 +0900)
commita2fbe9f3f9938cf3e6fcfad9fe6fc9044f990fe8
tree2c30c97eb6ac78dde5611e647eafbae1d8f3db39
parent7c778cecdb47a61743ba5eb9d5a1d6d28e1f318f
network/sysctl-monitor: fix use-after-free

Previously, manager_free() did not assign NULL to Manager.sysctl_shadow,
hence sysctl_clear_link_shadows() called by link_free() will causes
use-after-free. To fix the issue, this makes Manager.sysctl_shadow will be
set to NULL after it is freed,

Fixes a bug introduced by 6d9ef22acdeac4b429efb75164341233955484af.
src/network/networkd-manager.c