From nobody Wed Sep 07 02:08:32 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 4MMlzP1Bc5z4cCxp for ; Wed, 7 Sep 2022 02:08:33 +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 4MMlzP0D1Kz3Kf4 for ; Wed, 7 Sep 2022 02:08:33 +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 4MMlzN6KPfzMyy for ; Wed, 7 Sep 2022 02:08:32 +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 28728WKo072712 for ; Wed, 7 Sep 2022 02:08:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28728W4p072711 for bugs@FreeBSD.org; Wed, 7 Sep 2022 02:08:32 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 266136] ctl_ioctl() passes user-supplied size directly to kernel malloc() -> potential crash Date: Wed, 07 Sep 2022 02:08:32 +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: In Progress 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662516513; 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=gLIWs+YfvTAD3Uqj6GOsO1j7LywU1d1Zqz7fTA/Y4Lo=; b=pyHWW2aHnpxSg8RcWOVia+1Tkf/hTjSJhecx/lF3SBUFVtpNh8RDRVDvtHoDMcVG2juL4l 8J+x/AhR2Yx3ylnZLVxw8KtZApUz3uFbT/FhGQ3QVq8Rzbb2j4irWSf90m5tIX/+EObclF UzLTVErHMTPTu9t9IiLCV5tnP80vzrBYz0K5EihjpVKx15w7sMwRyUyTyLi0pHV7MIY8Wp BoLLyPzEaXtJa2LOkJ8dUNJFrmT34fxYjVDojtAlRS8I8wqp5U8k3w2yRgr9Mxkx5qK+Xw kUGjRnDfvo4qRizDwd11L1v0LfcQlRWOu45/L0NK2tt4J4nyvklY2xbOjnnFRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662516513; a=rsa-sha256; cv=none; b=G+eIW8VzFWCGNVDEB4SnQm9Pcn5klyECaFYocErhpju6noyupvwu8iQKIs3UcCsjw+Dcba vCMWauj3rSEF/2D5do1hGYfioQ1WfLvwtseljJBSalsKMyZ7ER7foZkND/nhorYfTXP7yp r+YiENK8Rrq6mM3WrnpPlBNV+wT6O9WszYNkc7nNODQvI1ek5bo4AINmwl0zysZFQe0mcw khYunAF08KK1hp9A955HLJHJ5rgdCqS3YWGaFOIax3XDfaIu4qErBgVpVTDmyfbtykMZ27 RSVGf37Xvmyf3IZ9C9gy87XqaeJbdol9t4vrWwECMRU09ZI7t/mLcuC2TPTY3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266136 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D0586be48a97c5af50ba4f578d33211f81= cc57016 commit 0586be48a97c5af50ba4f578d33211f81cc57016 Author: Alexander Motin AuthorDate: 2022-09-07 01:58:27 +0000 Commit: Alexander Motin CommitDate: 2022-09-07 01:58:27 +0000 CTL: Validate IOCTL parameters. It was possible to cause kernel panic by passing too large args_len or non-NULL result_nvl. Though since the /dev/cam/ctl device is accessible only by root and used only by limited number of tools it was not a big problem. PR: 266115 PR: 266136 Reported by: Robert Morris MFC after: 1 week sys/cam/ctl/ctl.c | 14 ++++++++++++++ sys/cam/ctl/ctl_ioctl.h | 1 + 2 files changed, 15 insertions(+) --=20 You are receiving this mail because: You are the assignee for the bug.=