From nobody Mon Sep 29 15:27:56 2025 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 4cb4nn3LXSz68PSw for ; Mon, 29 Sep 2025 15:27:57 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4nn2pg2z3ClN for ; Mon, 29 Sep 2025 15:27:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159677; 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=d8NG869Xg14bb2WfBTUOmJuLVSJ8fAtYsODRygCfZdA=; b=IXS3rmHbxquzZPr/dtGyjiR28aeoxsHlL1nuANufgBdER5uY15q6MyqUM3DI0vTd2smL10 wPHOv4mAUAVdywBOaYYpR/38diI0XJuiFkxU4gZMy6FcxARNVS9Laga4FRcBvx7om2pjTb 553O5MIVaQAYqXSzCEjLmK6G5/9dHt3Vgi6htjZl3R8P6q+Kb2lxCAaqL3OBWcPkL/yUKL CYxO1ilNfBBL6qvvfDOzcKAEDnQ+DKTTzkffCHiH2YrEUI2DyqOtZ2AQLaVl/McptBxEH3 UYAAow2EF6xiDXBI/LVasDL8DfKLqLR6aHFBvfJan3AuJhJR4mFNtdk3VTUU6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159677; 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=d8NG869Xg14bb2WfBTUOmJuLVSJ8fAtYsODRygCfZdA=; b=ptFGzEoK1gVPdASe/18f02UWJjb8yEHzIVdYqQsqPhba503Af5gBK0QOYSnaEUz2dM9Dmj KerZLZPO1hl5/zV7b1Xy06AxFMgI21kuELh2+Q47Y92OoBhW0HRkFrEhjWbift58p9+zlE CeTgm1B9ySEz8hGMFeRDM6NATHWm3lVf84WvPYtcCLXzmZeVI5qAuxgEkGdSREaiZ69mIv mdr5GDUx3YCpHBQrSLWvmu/0TpRMwzCIp5ico8zvEYl7CkGIBtU/WFYtxxygVX3bu9gvqz ivJ8wOv9JKxRp2F5aEAjglfIyvu/yybFGhvGY3dvl/e1Xq+1x/26/Rz+vEW3Rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159677; a=rsa-sha256; cv=none; b=EcWXIpTfviic2nXNlDdEKXtWw1utT2bAeUBIsnixB1UFQSwLuPcpY8PivixQpDE6ADZZ9i 9sGGcSoWmc0CL7cz46x2ss1KDmhY9BRt0r0n4LKImdXu+bJLJ3fipPCaBUNM0FfHWWzZ/K ADL1LW/tgQ7wUtY7+FLNlv7WThwmSbS6+5d655YP+4ZefdWwqHCANMJT9gp5pBLC8W8oCN rlSAQOZtOsnkSNq4OpO4vNDrqTLtzsw1Sr0C9E92AHaCgleE66hpe8gJJt6NXorO3pqZuD FUcBoPxQa2S/D4T2aCaeTrmTYJ/iJAzyIhzgFI3jsvnBzz1P8mHD3udEF4bSTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cb4nn2JsTz19FM for ; Mon, 29 Sep 2025 15:27:57 +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 58TFRvql022847 for ; Mon, 29 Sep 2025 15:27:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 58TFRvRF022846 for bugs@FreeBSD.org; Mon, 29 Sep 2025 15:27:57 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 289120] A time-of-check to time-of-use race exists in gpioc_kqread() of GPIO subsystem Date: Mon, 29 Sep 2025 15:27:56 +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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: vexeduxr@FreeBSD.org X-Bugzilla-Status: Open 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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=3D289120 --- Comment #6 from Ahmad Khalifa --- The priv->mtx lock is given to kqueue through knlist_init_mtx (which is cal= led in gpioc_open). It gets locked by knlist_mtx_lock (which is a generic implementation, since we never give one to kqueue) before it calls the knot= e's f_event (which in our case is gpioc_kqread). As for the ioctl race, yes, that does look like an oversight. I will try to= get that fixed ASAP. Thank you for the report. :) --=20 You are receiving this mail because: You are the assignee for the bug.=