From nobody Mon May 20 14:19:22 2024 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 4Vjfp273v0z5LMLF for ; Mon, 20 May 2024 14:19: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 4Vjfp244m3z4XRl for ; Mon, 20 May 2024 14:19:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214762; a=rsa-sha256; cv=none; b=TKqzy21r0PhnI6hzUskZNFV0JKv+H4kwAn+EFeuU0vyQWqRgFY9loD+lXij675q0nUy3wU fTawumcuXl8yju74LClxPMxhEyYCjPBgqlQh9JR/9bvPqmkjHUtSdtHka/8XWjE+nS4vFH dFwxsygCIZp7JHqfx+YEAPg+7oGKfQbkG5YOYugQd2LgiwpZJkUmgoa2ZtU762zqgl3Su3 9bqYa2UtxbTWcdI6wbXtktUjdnGEu6QiKeUp1oaCkOGh4ovLGOt4Y381H6axfSBRUzNzke XcjaFESzAkKxPBNvrX3SmP2GiirKHaj8m6Lu1dn4hh5Ssd/X37BtGyNr/HE41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214762; 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=QDGVDY13YzeAUb3qNiWZLDtMV+LMEMZiT1iUAg7B20E=; b=w6Ln4GBJ1tC8NIxmylXma50p0LQJTeihpablQTL51U/j4VC6E+C/RG3FEx+qXeoe3R/KF0 /ZP71RycgvnafP2YB4TyWI4uB7vQEjDe2+/watW4JKvOEqLKdHd6lzB8N6eIYCVoIHFkV7 IJgXNoFprncbtqtekQGJY4av3yeSguhueEgyxuIW+pkliXN7+lTiYn+LyZ+HJi6VO1e/88 2zvyVQm4og1D0rTvVpLembRQbj65DiGoQf1KSpoNXzVf4WcKsf5n1NwmwOkCYHBZbd2SiR M9aSkDijFhvyn2GwBiDboGnIjgjWVtvoL2TWef1Ewq3rSVtUy0amCb/ZLrqB4A== 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 4Vjfp23hv9zhm8 for ; Mon, 20 May 2024 14:19: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 44KEJMlb031291 for ; Mon, 20 May 2024 14:19:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44KEJM4L031290 for bugs@FreeBSD.org; Mon, 20 May 2024 14:19:22 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266142] SNDSTIOC_ADD_USER_DEVS ioctl on /dev/sndstat passes unchecked size from user to malloc() -> potential crash Date: Mon, 20 May 2024 14:19:22 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@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: Message-ID: In-Reply-To: References: 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=3D266142 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D074d337ad618f9cc2a1d5ab18b484928e= 57bd72b commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-20 14:18:28 +0000 sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS* SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size. PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236 sys/dev/sound/pcm/sndstat.c | 5 +++++ sys/sys/sndstat.h | 5 +++++ 2 files changed, 10 insertions(+) --=20 You are receiving this mail because: You are the assignee for the bug.=