From nobody Thu Nov 2 16:27:22 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 4SLq6258wrz4ypXj for ; Thu, 2 Nov 2023 16:27:22 +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 4SLq621Y9dz4nP1 for ; Thu, 2 Nov 2023 16:27:22 +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=1698942442; 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=X4bLoFjjd9w7YP0Rgd8iUrY/mzbIJhuCEXOiozU4SQ0=; b=VPvBocadhZJq+YAdx2eyXbLTSnK3Gtf4xBmXrdRjgheOp79sgwBvf8H5wQyJgRjwYYhOdK 866iZc1jo81rAoe7fCXu9Umo9IoxphYOHpeX+CCSWHaSH5APCZEpzCOx5O6a9bZJR+GOCR 6Eds5iPf0mdeQbfTbg5rEMp8IlWaS9Uw/u3R0QqfteYGK6kFtU5gQCb1dQe0wPl3g4ofvc itKADxdESO/RAYCN8KeYFFGSe9MQ+NA/8HUT9fLjjl8OEIw4Fm3rFs7VpO8fpA8OpyfXoz ILeXXSCodqNFAxCkqPp9P/KzZ3EodqudqhMKgQ+TgtA2EWKgGPwG3yrZmMHryw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698942442; a=rsa-sha256; cv=none; b=NNJUIPVm1lrOYMPtHIhEXvSfJxBcymfBRRdMktvvJ7YZn65KRWzPB8ZjGG5IIZYMT8K47L z6rAbIPmnAfXspL+SsG58bXxwbo9YyW50vcK6poRVXWRkviSUT5rEfN0NcaYaFe4MiSjVs Ypq8wovqDO9VPfrF2jmGWDqf1Y7psSqXcdzF2L10ulx1FELW9B2Lf5+M0n/rMmQcKAW4AO xVEcA5/wLtG2raaBpOFoR05kgv1UaYKFA4pLM8kwqqv9YPjZWnl66PbkMFfJuWVYJDRjzN UPYyuc0wmF2xu75endKHL2Mdl0NSaVAybBg7tfBEM+uk5XrYZ6nR0deX4ZzO4g== 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 4SLq620cZKzcZ1 for ; Thu, 2 Nov 2023 16:27:22 +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 3A2GRMbb016574 for ; Thu, 2 Nov 2023 16:27:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A2GRM9t016573 for bugs@FreeBSD.org; Thu, 2 Nov 2023 16:27: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: bugs@FreeBSD.org Subject: [Bug 274873] A possible data race in sys/netpfil/ipfw/dn_aqm_pie.c Date: Thu, 02 Nov 2023 16:27: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: 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=3D274873 Bug ID: 274873 Summary: A possible data race in sys/netpfil/ipfw/dn_aqm_pie.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 The struct field pst->measurement_start is initialized by init_activate_pie= (). And in this function pst->measurement_start is set to AQM_UNOW after pst->sflags is set: pst->sflags =3D PIE_INMEASUREMENT; pst->measurement_start =3D AQM_UNOW; However, if aqm_pie_dequeue() is called right after pst->sflags is set to PIE_INMEASUREMENT, a data race can occur: dq_time =3D now - pst->measurement_start; because pst->measurement_start is accessed without holding the lock pst->lock_mtx. The value of dq_time may be invalid in this condition. --=20 You are receiving this mail because: You are the assignee for the bug.=