From nobody Tue May 21 17:54:12 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 4VkMWT2PKsz5LtwN for ; Tue, 21 May 2024 17:54:13 +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 4VkMWS6R0hz4rtb for ; Tue, 21 May 2024 17:54:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716314052; a=rsa-sha256; cv=none; b=UwERsPIl6WOSdRrCpHHp0HmMMuiyFsLxDYGzzAkeFwmTdfO43R4/ZePDt/RgwCSyoMqfMa fivxE7t5VBiX3BTbHnBnmpzA5SW3btNFj0KiPb8exOPu85G71Y/8CCf3RjBJt+jLdKn2WI rKR0bSYS8rle1LioThMpGxdnZt/DufkRouZIed2prugpPjaU6kXfj5fcZ41lpHgLIksTU0 bmLgiqp/PRXwistaL+tdsr7tM+NUTWaWUpi7pOejK7XHOOZzU+BDgbeAl4CEuIfY0t24sD DvcLom4wycyV/yWVJCbXwdgSB4g+eLS0ueLaUF3IpL8J2ggdpvuw5oJYKL03RA== 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=1716314052; 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=qgjtRmlopd1YOKvuh7HURxQYk4z/Gm2Z3PP5QbQYS34=; b=L/1yMDNz67xkBbdj5BlSu8B/zkGJFpRf7gRpqfriLvFX8NAvWWAS8xBsofxNqWEASvBVwR bBFMwZxPGnLjfXdwND2A4MQA3jVOCRyXrV5f+2o52wI1nWT0W09Fj0PQ469dUMUzUo+cTS OSHM9oGGigLnVU9HNl8FoOscZ50+NveROhE9OVyRCUn1UPb4ELBubDJf09NYjQj87hlADz ngnU4cIG0+hKAXBJuHlnQ9qH8iF1EFtLiERRhZ1zJShSa97dIF2pJVJVLz2bCy44F2V2p0 x9vwBljpHNkDVrElxlGPuONnJr4S0FUTPMW0rPdZAn63mnzZwFMf0WNQa0YM4g== 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 4VkMWS62gVzXbL for ; Tue, 21 May 2024 17:54:12 +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 44LHsCQb049637 for ; Tue, 21 May 2024 17:54:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44LHsC3u049636 for bugs@FreeBSD.org; Tue, 21 May 2024 17:54:12 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: Tue, 21 May 2024 17:54:12 +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: Closed X-Bugzilla-Resolution: FIXED 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 #4 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D5830a00c2c5485ec17900558e4f29c459= c6a1f3e commit 5830a00c2c5485ec17900558e4f29c459c6a1f3e Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-21 17:45:49 +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 (cherry picked from commit 074d337ad618f9cc2a1d5ab18b484928e57bd72b) 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.=