[Bug 276248] race of IPv6 address removal with nd6_timer(), panic in in6_unlinkin6_unlink_ifa
| Newsgroups | gmane.os.freebsd.devel.net |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276248
Bug ID: 276248
Summary: race of IPv6 address removal with nd6_timer(), panic
in in6_unlinkin6_unlink_ifa
Product: Base System
Version: 15.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
nd6_timer() uses network epoch to go through list of IPv6 address:
CK_STAILQ_FOREACH_SAFE(ia6, &V_in6_ifaddrhead, ia_link, nia6) {
Note that epoch(9) introduction to the kernel this list traversal didn't
use any locking, hence comment XXXRW: in6_ifaddrhead locking.
The epoch locking guarantees safe memory access, but doesn't prevent
from addresses being removed. Then nd6_timer() may call in6_purgeaddr()
which will try to remove address that already could had been removed,
e.g. by in6_control(). This race manifests in panic:
#17 0xffffffff80c33c58 in trap_check (frame=0xfffffe000effdb70) at
/usr/src/FreeBSD/sys/amd64/amd64/trap.c:662
#19 0xffffffff8097e623 in in6_unlink_ifa (ia=0xfffff80002520900,
ifp=0xfffff8004d72d000) at /usr/src/FreeBSD/sys/netinet6/in6.c:1445
#20 0xffffffff8097ee0b in in6_purgeaddr (ifa=0xfffff80002520900) at
/usr/src/FreeBSD/sys/netinet6/in6.c:1405
#21 0xffffffff809ad781 in nd6_timer (arg=0xfffff8015064dc00) at
/usr/src/FreeBSD/sys/netinet6/nd6.c:961
#22 0xffffffff80673536 in softclock_call_cc (c=0xfffffe00b98be828,
cc=0xffffffff816800c0, direct=0)
at /usr/src/FreeBSD/sys/kern/kern_timeout.c:717
#23 0xffffffff80675e46 in softclock_thread (arg=0xffffffff816800c0) at
/usr/src/FreeBSD/sys/kern/kern_timeout.c:856
--
You are receiving this mail because:
You are the assignee for the bug.