From nobody Tue Dec 19 17:00:36 2023 X-Original-To: bugs@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 4Svjcj3b71z54YQf for ; Tue, 19 Dec 2023 17:00:37 +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 4Svjcj2ZH1z4pv5 for ; Tue, 19 Dec 2023 17:00:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703005237; a=rsa-sha256; cv=none; b=H0koBUe/Qlns9h7vWv98nvZF+rxG5wXEKEgOLeGn92j7OEz+zrTSBesjeXzQpR2ia5WeKe HhRdWOT/He1KX/hS4XLWFp+zkahGoDroXi9wErmvH6I0DcElOpPMp1XRGf0IPoiZHdXSzH SDM/c+lnIuXyLt3jhQEKnhCoTanq4zM39l5ef5BS+jAP7fe8KJgUuUPyBONgBAVBoXqYDs DlGLx+y5BKnqhmzVmZhUII9hvAYlwTCO7lfK5XKolDbSaF+zWNZVPUh4KBY8fml+Dh2IrM /W5BJjwmyC9LJL7bdjU6vEGWZjzZvd8/yMDkpX2vYY3yvnfH5ohSQTGhJ9X0MA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703005237; 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: in-reply-to:in-reply-to:references:references; bh=25JXu//HZRTCWmJntEd+IlyihFAW5fQGPzmZZhQcUHQ=; b=CUyEtrgFqFTFegh1VPCeyYordFUJ8bx2HlAq11MN7O7H6BCrv8kkCFlt+dyOMk87Cop1lP cRo6DWCqrYU1o4YMYYrn2wiZe7qp3/HlFzJ4bOkwZZXMvn+nWYMxPydPALxcDglYOcmvRA C1fA807K2mVufG+3Qi82zZ20LlU0ZSWHGeKo+pgO3HLjfjNEtnBOm+Ted6pw8/++itXS5t 6qE5zhsdu1J8578uh8L2zEnaJGlJz4zNEQ325gXsHfv7ukbK2BS6q79n79t+/7qUOibEm3 3+2mXHOOrOgLiCZO8U2EpBBo8x3A0W5Gbu2R/ZVRRI9XQ2Q9ZHGRBjWJ6TZCbA== 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 4Svjcj1fwWz1C4Y for ; Tue, 19 Dec 2023 17:00:37 +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 3BJH0bcl053901 for ; Tue, 19 Dec 2023 17:00:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BJH0bbl053900 for bugs@FreeBSD.org; Tue, 19 Dec 2023 17:00:37 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: bugs@FreeBSD.org Subject: [Bug 273890] accessing freed inpcb in udp6_bind Date: Tue, 19 Dec 2023 17:00:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: glebius@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273890 --- Comment #14 from Gleb Smirnoff --- Weldon gave me access to the core. Writing up summary for Mark and other interested parties. The panic happens at in6_pcb.c:257: (t->inp_socket->so_options & SO_REUSEPORT) || The temporary inpcb t has NULL inp_socket. It also has INP_FREED flag set. = The inpcb had been found with in6_pcblookup_local() which doesn't do INP_FREED check, neither acquires the inpcb lock. It relies on the hash lock, that we hold. And the freed inpcb has INP_INHASHLIST flag set, which is definitely a problem. These two flags should be a xor. Unless me or Mark quickly find a problem in the code with our eyes, we would need somebody, e.g. Weldon Godfrey or Dmitry Petrov to run a kernel compiled with INVARIANTS option and probably with additional patch that would catch creation of invalid inpcb. Please let me know if you can assist with this. --=20 You are receiving this mail because: You are the assignee for the bug.=