From nobody Fri Nov 10 02:52:45 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 4SRNfP6cKJz50gMJ for ; Fri, 10 Nov 2023 02:52:45 +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 4SRNfP4QRTz3Tlm for ; Fri, 10 Nov 2023 02:52:45 +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=1699584765; 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=nTBLpgiK6VGoGN5XklfuZQtLDPmDDvWzK+iUW3XEoFU=; b=Ipnhxv1TUxINiA/TpNlSqRqnViXeOYvkgxgxshExGob9q5CxWq0LNvHFkzUixklIQiZ79X 2vYKJF/GqSMC7DQXM3YiqD/Dm02IvMcyP9DqqFtifn6CZ0z9Ei54irvoASYsb513LV25Fo idRczL2r/Ax1ynE72hMIz6gQ1849+wrsaTeG+e2nRR5eMYmAQ/0tOsnbNxhL9R7oFubCWd gCpg8ol4sTTZ4VPft/0N7W2PxTiWE0HRnYknHsAo8nzFiUa837/mp7SLdUp8vNdPXG8HSw C9FpGJKOTICzPfsz5Q97s8/jG1OTX5+fnhkIRUF0Y+5cry1l8xN7vwv1ECH8yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699584765; a=rsa-sha256; cv=none; b=BkcEpGIRhnUotsjdJxo0B39qjgU7qkBKnV/WRixtXq2aQm8Cgjp1iftAkIlMskdQ/mrhLC /Mi9rEzxIrDPjV5FRmICNk0akpBPkaQL0lwPwX5dOdILc3UqfMs6gXkpclI0wZKKjfIaJN Jf71ZaKzKdveoYq/ZzW++tTunpdHf0/WxwOX8R9disdXIEmJ5qEkUtRdP3YAtojE+o3sm8 b5ZKtikPhthchl8nVKa1WVPKfjaAF2+efnuP+gxobNBdxB1cigYBOfpRsiaCF6gmAqIIax jzZrjg34mIlUVIiScRpyhr0csPNbmLR69ilVl7G1trJEFEx1XUWiT2ra2C2xYQ== 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 4SRNfP3T2VzhB8 for ; Fri, 10 Nov 2023 02:52:45 +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 3AA2qjOc012541 for ; Fri, 10 Nov 2023 02:52:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3AA2qjfP012539 for bugs@FreeBSD.org; Fri, 10 Nov 2023 02:52:45 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 275001] if_wg: Missing radix unlock can cause deadlock Date: Fri, 10 Nov 2023 02:52:45 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: aly@aaronly.me X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: 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=3D275001 Bug ID: 275001 Summary: if_wg: Missing radix unlock can cause deadlock Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: aly@aaronly.me In file 'sys/dev/wg/if_wg.c' function 'wg_aip_add()', the error path of returning ENOMEM when (node =3D=3D NULL) is forgetting to unlock the radix = tree, and thus may lead to a deadlock. Below is the patch, please review. --- if_wg.c.orig 2023-10-12 09:06:16.983637264 +0800 +++ if_wg.c 2023-10-21 15:29:47.928807521 +0800 @@ -562,7 +562,7 @@ node =3D root->rnh_lookup(&aip->a_addr, &aip->a_mask, &root= ->rh); if (!node) { free(aip, M_WG); - return (ENOMEM); + ret =3D ENOMEM; } else if (node !=3D aip->a_nodes) { free(aip, M_WG); aip =3D (struct wg_aip *)node; --=20 You are receiving this mail because: You are the assignee for the bug.=