From nobody Wed Sep 14 17:28:22 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 4MSS3V26PFz4bfrq for ; Wed, 14 Sep 2022 17:28: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 4MSS3V02HGz3RpP for ; Wed, 14 Sep 2022 17:28:22 +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 4MSS3T6Br3zktC for ; Wed, 14 Sep 2022 17:28:21 +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 28EHSLun006518 for ; Wed, 14 Sep 2022 17:28:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 28EHSLlp006517 for bugs@FreeBSD.org; Wed, 14 Sep 2022 17:28:21 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:28: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: 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=1663176502; 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=R+mDqAJSpQCXqcvjKfJyT3TBp2qM/hTNaeD5sDE0FPM=; b=XXoC9tbSYnl4ZiMy2pHEIEjBEP0OV25LV5sJXKxZBelpqJ9ydKnDWwPIkrAQy1x32EVCap DvJajchOB3vVldqA8raH+k+dAqY/GuhcBLmWj2mGMUEsvVx7UJtFlRb48k6LNsAn/Dou/Q uBS6mC+11ZY8mcu27DXbs+FfQR29YkHUXxwABFPwwCpN+yzP/o8r0qSm3jcSmgW3Drxa8k SFQK74K7llvoKqJ1zwMFJKI46C9tXteeMQQlemKbQ7rHPFvV/jpkG8y0o5VKh+71nBm45u /XQE6pHYTDzb4Pr/I/0/9liudQpsdClXwmYRU888BSEd7Bp334HprO8YbdrYDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663176502; a=rsa-sha256; cv=none; b=ovAtsgC79YWAbaRSuwBlPN2H0paYdtB9xsrIz1R8prm8R/zVbHKSkv4jBOisXMktdKblmr geRt+LHcNe5zcSbSBc3SYid7N/jh2AIFCOb0qrir51trdeRAME/pJU8WmshpWgsFvQt+Ow xKV3dZQglrTb4OzoLpKfzE6f8qY9WOofdhQMIGWb5mGtq8ff7IoRSx3GHso+CfdUu1P+Nv djE0bXwHrnUsZhMyLDd8ueQrZsUpo+6wQF8hl6BdjOSvJ43n/R7B2AgKawbrDQZy2iZerL w/daBO/ThG+NZru4AHlW7LYEf49bN525fdGRU/Kj9Qemi7cPnZeXC4IhzBzKEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266136 --- Comment #4 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc48d0754a05334cacbe6cd34871c10f3e= f6f4d56 commit c48d0754a05334cacbe6cd34871c10f3ef6f4d56 Author: Alexander Motin AuthorDate: 2022-09-07 01:58:27 +0000 Commit: Alexander Motin CommitDate: 2022-09-14 17:27:04 +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.=