From nobody Thu Nov 2 16:42:14 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 4SLqRC0c8Tz4ys39 for ; Thu, 2 Nov 2023 16:42:15 +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 4SLqRB5wq6z4v9l for ; Thu, 2 Nov 2023 16:42:14 +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=1698943334; 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=D0HPUcwXBTr6Viibjo6NNFskHO9FVx4fU7bT+hcuKOg=; b=knp9FWp++CUTlMSQNffz3ukir36+b7gscpxnV1yzk1KabUhNyMQK46bt1F2EuojXgBdA3q F41/qfNjBQAr4R51zrPRf0wuPw+/wdQZQvSC9LSply42DC3bTZlEkyt42pUXTNer8gQRjg 8JKDwrmsc2+/HXI+zQHraQblAGfOEyh5rOaBJ65Phjx1avTJNw3Adpy0JlnI9GMWWQxGw8 +eCUdOMRMww+9oezJgfkl/Z0i6fUcSm2xofw1CQ9+lzGgiX8G84BnqGtIastqeR65PBlW8 pGyIx58WlLRmLeE3fStXwG9PrnNU8t5yKkoJ9zkaeERcnuP+g/aLw2AhpvVUzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698943334; a=rsa-sha256; cv=none; b=VkFFr1HJ8BQ8GKVX7o/2Fg/uPNPe4cc91FeLai8AxpJvVyfJPB9PA+UKJXaJlEsmlUQZ0E SyDMVx9eEwNK/DmyCUGPBx/0CZ9xBhUELCgNc5nFk2eVoNDzYKEvXFiOktnGZq+XTg0mbv h82lNCxxM44DF2vLWSKZlNaBgRHQcO2Pu88TuS7WFgOIBZ0WOyCCph4xeS2ikTdhxZP+Dd CBdCMzNyVOm0LRNh5LMED/Vvj+hF+TO1DSaUIxBl53ctowldNX42ru6npg/FQVXi77vWMp 7yD3RbB4QFajEXzpAVPjL4f/cKiZjXgcOG/XSruml1/snD3Qc6FfPQu6am4xbw== 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 4SLqRB50gMzdCQ for ; Thu, 2 Nov 2023 16:42:14 +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 3A2GgEM5043528 for ; Thu, 2 Nov 2023 16:42:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A2GgEg9043527 for bugs@FreeBSD.org; Thu, 2 Nov 2023 16:42:14 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 274874] A possible null-pointer dereference caused by a data race in sys/dev/firewire/fwdev.c Date: Thu, 02 Nov 2023 16:42:14 +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: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: islituo@gmail.com 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=3D274874 Bug ID: 274874 Summary: A possible null-pointer dereference caused by a data race in sys/dev/firewire/fwdev.c Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: islituo@gmail.com In the function fw_read(), ir->stproc is first checked to be not NULL: } else if (ir->stproc !=3D NULL) { and then is dereferenced after releasing the protecting lock: FW_GUNLOCK(fc); fp =3D (struct fw_pkt *)fwdma_v_addr(ir->buf, ir->stproc->poffset + ir->queued); However, if ir->stproc is set to NULL by other functions such as fw_write() right after the lock is released, a null-pointer dereference can occur: it->stproc =3D NULL; --=20 You are receiving this mail because: You are the assignee for the bug.=