From nobody Wed Sep 14 17:29:24 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 4MSS4h5cyBz4bgDx for ; Wed, 14 Sep 2022 17:29:24 +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 4MSS4h4ZDvz3SKx for ; Wed, 14 Sep 2022 17:29:24 +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 4MSS4h3ffmzl1k for ; Wed, 14 Sep 2022 17:29:24 +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 28EHTO1x006844 for ; Wed, 14 Sep 2022 17:29:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28EHTODD006843 for bugs@FreeBSD.org; Wed, 14 Sep 2022 17:29:24 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, 14 Sep 2022 17:29:24 +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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663176564; 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=JWD+QES1yLrFIK3a/l+A0SrmaVDkbZdGxere4JKuOx0=; b=SjLQuXkEllxwIkagraK3oWYHmnzkr5V4hMYDbB0sALsNa9LSLYh/UJWeEo9bv0Br4oiSnA Qnrd/W+lbkLXxc489tlj0SJUyX0KEq6w4uFbtJwZvXYj7peeIdguX4wCnemhifJqGcWyB3 iV+6tJrbULL3U/JtRCnFvm8DOwPIB1YdrH5tetJFBqSDbiFNboxMGvKA3Blsb9x4fVcoOw 8rwWWogSulqdx6S6DqL/b33jmBiYl79VIWz28yXjxhTjFJnugcPoUEVay6EzkMNhK+JVwo zIpFQHwMLG0CW7bJ1simxhNvSYA8MX1o7kUQicotD+qvw698LLSvBSuIMotuTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663176564; a=rsa-sha256; cv=none; b=ZgZCOpSidWK2bPws4sXgNHp31wnop2zlNosyTee344dYOqogVIYZO3pj5807/HUU+QBpED SEK90BdOrDxR5S+yewIG1yRmjfuUh5x3SI1bRVCqLm+c9xVpE2SBO7gwAlOXvXKh9WfhKj OP1VFoYBMv4rZFIZziH1QpK2kNEWZPGFDWd0DKhnMNrg4uoKuDZJ5lDsW9XoD5fRHxV8bC UhnKPcojrXkWZDcDcW4dtQAOuEu29a+65XVzu87rjz/uyBZo1oNdBUiOVfz+Y1dW+qUgom s3sbF3fut4rSJcBuZclVPntWNLn0zaAcMYPIvD7fWHs9LOjXj58Ns2jeGxFHdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266136 --- Comment #5 from commit-hook@FreeBSD.org --- A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dce1895b7248d5601b34d0d6492539a708= 1a8d451 commit ce1895b7248d5601b34d0d6492539a7081a8d451 Author: Alexander Motin AuthorDate: 2022-09-07 01:58:27 +0000 Commit: Alexander Motin CommitDate: 2022-09-14 17:28:18 +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 (cherry picked from commit 0586be48a97c5af50ba4f578d33211f81cc57016) 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.=