diff options
| author | Florian Westphal <[email protected]> | 2019-06-17 14:02:27 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-06-17 23:27:42 +0000 |
| commit | 40008e921133f95685ca4dfd7233b3df96af2bd6 (patch) | |
| tree | 338373f2866142f36d2f67893f2bebae50f35ed2 /fs/ecryptfs/miscdev.c | |
| parent | net: dsa: sja1105: fix ptp link error (diff) | |
| download | kernel-40008e921133f95685ca4dfd7233b3df96af2bd6.tar.gz kernel-40008e921133f95685ca4dfd7233b3df96af2bd6.zip | |
net: ipv4: remove erroneous advancement of list pointer
Causes crash when lifetime expires on an adress as garbage is
dereferenced soon after.
This used to look like this:
for (ifap = &ifa->ifa_dev->ifa_list;
*ifap != NULL; ifap = &(*ifap)->ifa_next) {
if (*ifap == ifa) ...
but this was changed to:
struct in_ifaddr *tmp;
ifap = &ifa->ifa_dev->ifa_list;
tmp = rtnl_dereference(*ifap);
while (tmp) {
tmp = rtnl_dereference(tmp->ifa_next); // Bogus
if (rtnl_dereference(*ifap) == ifa) {
...
ifap = &tmp->ifa_next; // Can be NULL
tmp = rtnl_dereference(*ifap); // Dereference
}
}
Remove the bogus assigment/list entry skip.
Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list")
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'fs/ecryptfs/miscdev.c')
0 files changed, 0 insertions, 0 deletions
