CVE-2026-99978: ipv6: serialize address publication with device teardown
In the Linux kernel, the following vulnerability has been resolved:
ipv6: serialize address publication with device teardown
ipv6addaddr() checks idev state before allocating an ifaddr, but publishes the object later. addrconfifdown() can mark and detach the idev between the check and publication.
This happens when a non-loopback device MTU falls below IPV6MINMTU. A forced interleaving published an address on a dead idev, and ipv6getifaddr() still returned it after teardown. Later device deletion remained blocked with:
unregisternetdevice: waiting for ac0 to become free. Usage count = 3
Protect the dead indication with idev->lock and keep that lock across both hash and device-list publication. Recheck dead before publishing; if teardown wins the lock, reject the unpublished object.
Non-unregister teardown does not set dead. The preceding change covers an add that misses the initial hash scan but reaches the per-device list snapshot. Both changes are required when backporting this fix.