From nobody Wed May 22 13:24:18 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 4VksTZ2DD6z5LjfV for ; Wed, 22 May 2024 13:24:18 +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 4VksTZ01txz450y for ; Wed, 22 May 2024 13:24:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716384258; a=rsa-sha256; cv=none; b=hlD2z4R2uWtiZi/AkWp9kqVdktBOLK4p3RPmJGIJ7o3sNdQrHrSQXfcG4HFh0AdYDBkcC9 OSW3SKmD0LUEytwj/8zXrNP4ZlVZsLFpY2srekBaCPyE9NEuRThhS45wFpGKGAqxd5r5D2 5KxXyrWscC5DmdcbNDCFL1ajsQWLudJ5oettBk9XstaFiViXHz9cCjfXx0znsRBpItBgxC q2oFnuKUItMlCYPpNkCdsSdwKtmvGizlMNkXTq6O1ZmuRYVjGAswbPhRBxCAj4JWB8I5Pr /ui0/bN6Ww9WmqRp+X3fcUuBiRqHdm3M4zbvCrfBmZvqFcuEkT/UAR2ajAIWrA== 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=1716384258; 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=5GbtI9RJxusbrs2Cr3CwVpYjgfEVV/ixV5cdHdb8zek=; b=O2aBOqpjNKDvV+Y+CXx5a4YWv3Jl7dq3YbEhjyP4R9sq641qiqyvdDtL3zC3PcICLOy/kY cERI+gVSv9Is26HIbpMDW7pzyeHmP+smbJDIdY1hlfcw459hIfNo099WBDPD9kqPaDgPX4 sqVRmKoCTC4sCJlEEbS9g/Y3FZN93SQLp2JsmFe51pMT20ZA6gviFJkLx3NO3/7qty1zDs +FZ00fxpkPZdnsDVHtq5OnUKQCkg4fHgnY3h6xYYE69JIblm44ip+/cHH+IRog+b5CF4R/ 1a7DiBS3zRiLbe4TuxUWTY3DtAgwifo3hNtnsTexLQg0kxiXudE+bXoAB7MZAQ== 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 4VksTY6lWvz16v4 for ; Wed, 22 May 2024 13:24:17 +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 44MDOHKJ057458 for ; Wed, 22 May 2024 13:24:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44MDOH9s057457 for bugs@FreeBSD.org; Wed, 22 May 2024 13:24:17 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: Wed, 22 May 2024 13:24:18 +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 #5 from commit-hook@FreeBSD.org --- A commit in branch releng/14.1 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D18f80d6d463495703f9eb2ccfd92bae93= c7889a3 commit 18f80d6d463495703f9eb2ccfd92bae93c7889a3 Author: Christos Margiolis AuthorDate: 2024-05-20 14:18:28 +0000 Commit: Christos Margiolis CommitDate: 2024-05-22 13:22:26 +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) (cherry picked from commit 5830a00c2c5485ec17900558e4f29c459c6a1f3e) Approved by: re (cperciva) 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.=