From nobody Sun Dec 18 00:32:24 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 4NZP1N2sSvz1Gpqd; Sun, 18 Dec 2022 00:32:24 +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 4NZP1N2M02z3l3Q; Sun, 18 Dec 2022 00:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671323544; 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=IghWTuT+Emb0kBf888890DOsfbUGdwNYed4HiYBazxI=; b=Lc61iXBzFzVDdNQiLdFc14uBBEFHQUYBPMm25UGP67fkIvuBrBnoMe3+9p9bUeLtkFyza5 jpGMmwJNNllLY690PnwTNzJNHGkUvLvC8pcaZfdlzUflM9OjR+iyQHDYnERiKtp5/k1ciw uxUk9FQCr2pbOB2SonxXMNzfoMGCwJvlA8100yiVp/9riE/Jipl/ooNeoVoARi+wtX+GMz hn7BHkzA70x4k5LLtMJ8hMEu/ym7ongQ7b39pn2A98liHqUD2miQ1tq62O1RxGgeRErflW fW1L7jG22qCOJCh3ZvPFS32AKlBJL3hxxxeTuIjl8mNBbcQiLprNqHv2Qzn12w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671323544; 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=IghWTuT+Emb0kBf888890DOsfbUGdwNYed4HiYBazxI=; b=sKrryIYq0f6xIbu4/DFiYQavoVl0YrbOT/G9Yru1SVQiGsB40VyXbUXmIykY834XCupfzZ 6uDGMFILv6Twyt+2EHrx0HK83HXYXZsn2q4HgGOIOe9a5GFKqmFRaN5LcAS5xoSXSeyiQj 3jl/KdarXcQ5QFXdvainD40cEx5q5/DJ5gHun6L3OWL2SfxB+3TrH7Fup3FP3M6o34gx9S eWGlLlurMr5r9dIUvrcVenjmrImnWR9m9Az/7WRvN1pl+VaS7Wd71fn3MHhAy6pZrZklQh /91g9sp/MsC/qfOcI0xrZHeyFqaE+z/4OMuRLx4xvZzw4qwqXhiPOreK9R+YMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671323544; a=rsa-sha256; cv=none; b=Kc1Yh0OWHh1YxCclwIb1UTGf1N4tAId0dA04jQAaf/US1VhkQWAAhNWx5kov66hM5jfxrj aRRAwzO9Bugdtp9iCqNgNCIiF7CiXbMUM4oxIyYjdeqNtcTRg0GDWIuUhqxgOP6NQJEq25 vK1zbLgKycEVwJudIIWHzzik5nDnTt5OR3yredKLK651JD+u5V5pUC7rLdxBhl6NecVuIT b3Qgj8DzAqSRrAH5VqjEmz8VtQ7b9WzwY20lghry40PmS2BXkvQvUGY4NFya/XsNK3zYLg wHTivXt4E0/L5yU4SvbbsDfqxGJwov/5S6UZHmduSyu7DHa4tAKARjCWzonoug== 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 4NZP1N1PvPz1BbW; Sun, 18 Dec 2022 00:32:24 +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 2BI0WOJI031767; Sun, 18 Dec 2022 00:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BI0WO5R031766; Sun, 18 Dec 2022 00:32:24 GMT (envelope-from git) Date: Sun, 18 Dec 2022 00:32:24 GMT Message-Id: <202212180032.2BI0WO5R031766@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: 47f21d91808c - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 47f21d91808c687e88f7f63930b73a893ce6d2a1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=47f21d91808c687e88f7f63930b73a893ce6d2a1 commit 47f21d91808c687e88f7f63930b73a893ce6d2a1 Author: Jamie Gritton AuthorDate: 2022-12-15 00:47:55 +0000 Commit: Jamie Gritton CommitDate: 2022-12-18 00:31:31 +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 c1d418d6cc69..6b23af25b01c 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -440,7 +440,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;