From nobody Wed Jan 10 21:10:22 2024 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9L6l3YmHz569fP for ; Wed, 10 Jan 2024 21:10:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9L6l1FWfz4mWw for ; Wed, 10 Jan 2024 21:10:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704921023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iXMHeIgpD9c1gMU5qZL3NV4vRVgRiiNqjnv7EAC/TK8=; b=AsfptklgPVbxAIIOYfbxe/8DJZRMqymONhX48NDxn5fVXr5h0U36KpKxycUpxOS7Wkoe4j NUgytyVwtiCGrQbka3NgGK1C1RewrXIXWN58b3pU+CxkrCUoCys019uY/GeqTnNzjsCYOd ycmubHGMmUQNl3rBvUiMoJdGaY+CQBP571sk/O+xkW7/MlPnDkAwTetSxodnGRPf+gX3BN sOy9EVXhBKa9AuRTqhO07cJYn5GBWxL42AUFgCEjhNwHIHTLZNqd+prSZ7wjv5GEZ1FVgv Bb7uRvTllMQjvxHphhHG8IJ8r1trF3r63wc9DPOiBnQbxxik7eU1Nd1YpKd//w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704921023; a=rsa-sha256; cv=none; b=uCz4RDA9QknS9AehcgIJQZ71J2yomhuXrFLxanHjobnt8UdH5p4GS9KGIXfGNJb2L7M51S PeFbg4bjK3Y3OASG9/EAOH8mZgzdPXkriF6awPp16u9KHxpmV5c2jGPDK9rw7oYlz/vPz4 43SrtRNhy5ry5NmcXsgZ/5dJRe7/fyaZj6dgAgI0Uzh5pdbYwF5I7JI7JNb038KlHQTXXG /iYfCDowidmfSp7wub8CEKfOiJIb2BBKJdsmYwTRMbTj9QtfZJwyL36UJSSJuLBdjfbqJI 7KQ8dsuFPjU+lzsWX7R8hROrGrULSBXTJ5In9kDiBpeuwEkeFr9zp/ilnuaStA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9L6l0CXQzr8c for ; Wed, 10 Jan 2024 21:10:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40ALAMoA080758 for ; Wed, 10 Jan 2024 21:10:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40ALAMjx080756 for net@FreeBSD.org; Wed, 10 Jan 2024 21:10:22 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 276248] race of IPv6 address removal with nd6_timer(), panic in in6_unlinkin6_unlink_ifa Date: Wed, 10 Jan 2024 21:10:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: glebius@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276248 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: net@FreeBSD.org Reporter: glebius@FreeBSD.org 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=3D0xfffffe000effdb70) at /usr/src/FreeBSD/sys/amd64/amd64/trap.c:662 #19 0xffffffff8097e623 in in6_unlink_ifa (ia=3D0xfffff80002520900, ifp=3D0xfffff8004d72d000) at /usr/src/FreeBSD/sys/netinet6/in6.c:1445 #20 0xffffffff8097ee0b in in6_purgeaddr (ifa=3D0xfffff80002520900) at /usr/src/FreeBSD/sys/netinet6/in6.c:1405 #21 0xffffffff809ad781 in nd6_timer (arg=3D0xfffff8015064dc00) at /usr/src/FreeBSD/sys/netinet6/nd6.c:961 #22 0xffffffff80673536 in softclock_call_cc (c=3D0xfffffe00b98be828, cc=3D0xffffffff816800c0, direct=3D0) at /usr/src/FreeBSD/sys/kern/kern_timeout.c:717 #23 0xffffffff80675e46 in softclock_thread (arg=3D0xffffffff816800c0) at /usr/src/FreeBSD/sys/kern/kern_timeout.c:856 --=20 You are receiving this mail because: You are the assignee for the bug.=