From nobody Sat Feb 05 16:27:16 2022 X-Original-To: dev-commits-src-all@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 9703A198CD0B; Sat, 5 Feb 2022 16:27:16 +0000 (UTC) (envelope-from git@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 4Jrd903j1Lz3PJl; Sat, 5 Feb 2022 16:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644078436; 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; bh=b5olgMCi+Ob4uKDrrj3tW16RMwNHAk/giKBlb+CM3Z8=; b=k0MNh2lC6qGS8LLiaVMQlqhHlo5p2UvRlVIYCSH3YeT4SOU3HyUs+EXph+G54in/U8c0IE xRS/dJFYOkzt5PAHrnq6afRy0UqOfgJcrDKUeiPnuNNpN9yfouUGcJj9j6t7zkafPC+PrE S/I7tvyQ6gck70NrlgrHQ5OVmIlW0XjWV37I1dLdDSHz7ecojGQtwpX0tBTPRjoJtAi2r2 lnloeBTohTAcn2xx+wTN4IugUbY9JlKaHItqu62EB9/o2oAQL61Pri0W4KCcBPlBwZmS/s TXsX+ueTiij3OAALdRHgwKIZLuWDYSzltWhMcwIrOgKoF/DonHaJqNNH/9qr8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 58BF422911; Sat, 5 Feb 2022 16:27:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 215GRGCt038617; Sat, 5 Feb 2022 16:27:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 215GRGdA038616; Sat, 5 Feb 2022 16:27:16 GMT (envelope-from git) Date: Sat, 5 Feb 2022 16:27:16 GMT Message-Id: <202202051627.215GRGdA038616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: eb32eb2b453d - stable/13 - dma: exit if invoked with invalid (zero) argc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eb32eb2b453d21534efaea4cfa17043a634e6199 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644078436; 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; bh=b5olgMCi+Ob4uKDrrj3tW16RMwNHAk/giKBlb+CM3Z8=; b=AS/hybyzVyNx8Za/B6OTAYUz7vSz7zFmD3EKW4E6K7zcIZu0Zf6rKuqrk6CG8bCvVl5wcw 4gDMVHJpUrPS+DeS1BL/oUjEHeKlsLXnaWR9M6x6+03WZ/GcV/waLo5UJLT1WA0LMLHa85 quzLxJHvRjD9c7RjcBhrg9haIFuJvkUvlLhVqrejXHtN3L9aRG7Nof9OFJMvpoccdDShl7 zDgBsztrxMtYiCAB2eETe00QQL0+SRPTEj3+NRltcQUc/qOpnh9cV21x6D+ZG9u5iruSBf VmXLKrkewxq4w7DYY5e7FqBEjLBxy7wXOcQoQk0ann6NeDDtPf+4g6JlH0Ioog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644078436; a=rsa-sha256; cv=none; b=ug1VKeayjFuXVzlS1i8UMyIx0/IRWscPYWDxDBAlaph+fJ6fHZFsF7Rp8shiQpHKhWJpKc B2zZIww9QojYdLQYfVF32vWASQt42FO2G6zUkhGyWAV+Gty47cFshUzvSduu562aoKNEut EbF7asWRy0OS9ZP2NanbdUU63H75ThESigyCFaKvJ8TCYIODXREAlmeqYcCUf/wgDQxg4V FOxnXQbKjAe1qB/U5hZmRE1mD6OpGnPcOJoL04GA2M+ku7Q+ceyX8yoe6+A9Mgb3wEx41I oGHp8ISxKFlQvFDJJWkNe94RUST26U73ZIPI1tPcfvAHX1qwxcLoEXSnMDdKCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=eb32eb2b453d21534efaea4cfa17043a634e6199 commit eb32eb2b453d21534efaea4cfa17043a634e6199 Author: Ed Maste AuthorDate: 2022-01-28 22:15:02 +0000 Commit: Ed Maste CommitDate: 2022-02-05 16:26:09 +0000 dma: exit if invoked with invalid (zero) argc This was prompted by the recent pkexec vulnerability (CVE-2021-4034). This change is being made on general principle for setuid/setgid binaries and is not in response to an actual issue. Reviewed by: kevans, markj (both earlier) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34087 (cherry picked from commit 1c91aedf25bce879a8aced6439200e46601eb8a4) --- contrib/dma/dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/dma/dma.c b/contrib/dma/dma.c index 72115ae2b55e..7cad25a214ee 100644 --- a/contrib/dma/dma.c +++ b/contrib/dma/dma.c @@ -428,6 +428,9 @@ main(int argc, char **argv) int nodot = 0, showq = 0, queue_only = 0, newaliases = 0; int recp_from_header = 0; + if (argc == 0) + errx(EX_OSERR, "invalid argc"); + set_username(); /*