commit | 1a708ece1ad8b924466e81c5fcdf4e22311fd770 | [log] [tgz] |
---|---|---|
author | Alexey Izbyshev <[email protected]> | Mon Feb 27 23:05:16 2023 +0300 |
committer | Rich Felker <[email protected]> | Tue Feb 28 11:59:53 2023 -0500 |
tree | 55419af5ea43de87affd4f0001fe49b92b600eb7 | |
parent | c499c1084eaccd83e4b6e60883a5d92df0202c5e [diff] |
getifaddrs: fix UB via taking address of null pointer union dereference getifaddrs computes &ctx->first->ifa even if ctx->first is NULL. While this shouldn't be possible on the success path because the loopback interface is hardcoded into the kernel, this is still possible on the error path (for example, if __rtnetlink_enumerate couldn't create a socket due to exceeding the fd limit).