From nobody Mon Aug 29 16:21:29 2022 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 4MGbKk25xWz4bRK3 for ; Mon, 29 Aug 2022 16:21:30 +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 4MGbKk0t7gz3FG5 for ; Mon, 29 Aug 2022 16:21:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4MGbKj73dLzV1S for ; Mon, 29 Aug 2022 16:21:29 +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 27TGLTRe000682 for ; Mon, 29 Aug 2022 16:21:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27TGLTA3000681 for bugs@FreeBSD.org; Mon, 29 Aug 2022 16:21:29 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 266101] ucred reference count may overflow Date: Mon, 29 Aug 2022 16:21:29 +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 Only Me X-Bugzilla-Who: emaste@freebsd.org 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661790090; 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=/L8lZt7t3Vd8pnJegHRETgktUubOM4KNven29QeNdZc=; b=D69lp4SiAS3CC1/jbPL4pkCRGnUQN6ydsz54uyjKxOv+uWUJtTXT5tCtYDJ9u/j8XZ7B0q GW8+HUHbFn6K7n5mpeVoGn/G0iJxKmYTYQ1aWTEEIRICEXF4+cs4SvKucKitFkoqCbRWOm rTS1KuacrLaFW1MeaENnxVihLqpIbVJ7vd3x74kh928Jm7jr7H/HharlhYn9FkXryykHK0 UGzIrFUvzIiZqBI4OQ45/Ul+/8L3lbRMEK0n2oF2SDmWSqviCYo1O2gOTOyK2VLICKJ7U0 5VWjx2Ub/N68K79GSKICDN84nVyfW4eUq4W6CuDHuB50BaGsxT29JUriKdCvLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661790090; a=rsa-sha256; cv=none; b=ttrSB8IfgPIZPXi/djo2U/QFodlqPWNfH4UPsZbV6NQi1BqlMpoBQmNFcRwOJ90FIQcdkL WLmwC2YNVLeVyuGSGM69oKw/UYKzlxD/e1VxNkj3lYEAWjgnh1XXI8ZlhWvbZ02uavEnn+ sE/loj6BIHW199jnHy716iX0RrQjrzORJmkC4oVutddZaZmbIoI6Eo4/tw+Wf4AKpBy+rq 1RVqAgH+xRpP3YamFi0OWHahv7Gp6jREb1uHR1l/nF66ZQrN7Kbzivgg4mRORGm0gEgL6N Us/qWM361FAFrIBQNodcj730sJu6z+StIIrMwwwSOOQJSJsh/vOCu1COIkFCWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266101 Bug ID: 266101 Summary: ucred reference count may overflow Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: emaste@freebsd.org The refcount(9) API mitigates reference count overflow (by changing it into= a leak) as of 0b21d8949934 ("Handle refcount(9) wraparound.") As of 1724c563e62f ("cred: distribute reference count per thread") ucred handling (crhold etc.) does not use refcount(9), and so is vulnerable to reference count overflow. See for example https://accessvector.net/2022/freebsd-aio-lpe Need to either use refcount(9) or add explicit overflow handling. --=20 You are receiving this mail because: You are the assignee for the bug.=