From nobody Sun Dec 18 00:33:37 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 4NZP2n478Sz1Gpx9; Sun, 18 Dec 2022 00:33:37 +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 4NZP2n3ds0z3lPs; Sun, 18 Dec 2022 00:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671323617; 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=v95Bqx20tykP5ysBHAqwPEmsw+5yDBCwltSsjUHfSJg=; b=pI/u5NKq5D/PvTvw+hecFVmSNYqmCbayFZgn6PveXvASdk4a1ToINa2K0v+FFx1xS40yGF dXsq+dvGL15LonluK3CGexO6aaqw2Te/6kQLd8kjm48/QwafhVQ6vlqkvZ8Owl8HXsNzdk z8AjUppNfJ/ONYzt58McetgO/1nJ0d7n3UUC/RkY17VpaDfTiPwGMHbLAGykmK2z0WxsQp ol3o405xBPjU/r8By6XoXCcon8F5RPGJu2TwRDP2Swfi0nCTdi7egLEmxG1HwD7YK+Dnk/ 972fo4rShToTRvSEla/eB2ERDjPHI3esTYpxMj+EbZQ6YWmAX5i7sIauiWNuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671323617; 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=v95Bqx20tykP5ysBHAqwPEmsw+5yDBCwltSsjUHfSJg=; b=kUaQjdh8Syc95L2NoUoBJdETb9oAOrelGCCdGkqqTTZiNXNrdbQWq6qF5yokIeqAhul0ni wuOgLIuu3B+/h6s5d8s7i6hFXv4xzsZlu4m2YlVQGKRZ0KMewU6CvZJt3URtjYvaaQQx0I v10FDcsVKiVxGGeZpc8NjteTEe+jmyGMdGraNQNWS/s29m9h0evXussaqhcg2tEQ3/dC4U 0IFsa1CwcfD2WZQojAEH6uU2t/XW96XAty8jipQI/VtG1ZNgGFbHyugLTQW3cHixSytTxJ /hZMrtCnfyJxjzt6uFYkSP9UQVZLUBJeTX4h3M7wJ2kw4LrJ3yuQnZfR0y4Wsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671323617; a=rsa-sha256; cv=none; b=x3gAvJf+KojWyKu4dgqa+zmaQnxGevT0ydhfkJxmlyBfL4/BeGkT8jP3lDK5BUHJkOaHYy KgYJHVXx/g0CoiAAlu98JgEmECMOebJfHoNp6bmztXxJ56DKNfBh90T0Ty/+4oJyqTiZET 8kniQsY2BUViMgAjSN28AphJWehQh5tb3s36QWBqhS/OzedS4gr+vsl5YA0Smq8o3DyBy+ DbSbq1UFiYH1CYbKoGadilrtr9nITezvYGEdXEpCKk5KjChIKURGzqhVANF+Lmzf722AU4 OXow0rrHT4d04pyDNKYUB2+IA1Uk/ImmFZKnzTIRDhMkKTw+9eqi9kpYxrE6Ow== 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 4NZP2n2khXz1Bbb; Sun, 18 Dec 2022 00:33:37 +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 2BI0XbWt032089; Sun, 18 Dec 2022 00:33:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BI0Xbmn032088; Sun, 18 Dec 2022 00:33:37 GMT (envelope-from git) Date: Sun, 18 Dec 2022 00:33:37 GMT Message-Id: <202212180033.2BI0Xbmn032088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 561dcc7f3722 - stable/12 - jail: fix a NULL pointer derefence in parsing ip6.addr settings. 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: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 561dcc7f3722315c55176be5611a010155724a89 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=561dcc7f3722315c55176be5611a010155724a89 commit 561dcc7f3722315c55176be5611a010155724a89 Author: Jamie Gritton AuthorDate: 2022-12-15 00:47:55 +0000 Commit: Jamie Gritton CommitDate: 2022-12-18 00:33:04 +0000 jail: fix a NULL pointer derefence in parsing ip6.addr settings. This is the counterpart to bd24e861b4ef, which did the same for ip4. PR: 268377 Reported by: ahkithaama at proton.me (cherry picked from commit e8d7ae918a105f252cf06249787d82f43e023ba8) --- usr.sbin/jail/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 8061b9a21878..56612718a879 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -424,7 +424,7 @@ run_command(struct cfjail *j) } else argc = 4; - if (!down) { + if (!down && extrap != NULL) { for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { size_t len = strlen(cs) + 1;