From nobody Thu Jul 21 14:38:55 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 4LpZvM70stz4WmQ9; Thu, 21 Jul 2022 14:38:55 +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 4LpZvM5x2zz45Pk; Thu, 21 Jul 2022 14:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658414335; 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=hTYTfoo1dcWXu/uZwLDGImwFU4H2SePBENqaw/PIHJ0=; b=nvd0Z8n1Xk7lTR73u4dNWiHZYkpPlp28krWme9fA5jHs/+0SEs1v8eaHWWmRN7uILIwvg6 IfaEc/ojcK1BeJVzWxFS9XB13DQ8ypDgRx7Ou5JGRX/rzlCFSup52+Hk7JOJ2OJ2YsZrCS ZvQn9ZLczbWF3YYj33cVOeZgD96rQKLIQFy6o2i13aS+CjKm2z5ij7gml9DFeaXZxB21RV 22JhiS9tD5AGcfMyGCn+b+2AHecmrV6Nlcnr4CKz/TrwEy1v/1yWEUS10nqqZNA6PU936I rEnpl+nJ5JM89Vpb3w3Ym5KbHFhJTfyl6ZZxcMfAhzg82uhRiOZIfkckgM+P8g== 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 4LpZvM4mq1zQHf; Thu, 21 Jul 2022 14:38:55 +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 26LEctcK070240; Thu, 21 Jul 2022 14:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LEctew070239; Thu, 21 Jul 2022 14:38:55 GMT (envelope-from git) Date: Thu, 21 Jul 2022 14:38:55 GMT Message-Id: <202207211438.26LEctew070239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: fb8ef16bab0d - main - IPv4: correct limit on loopback_prefix 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: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb8ef16bab0d23e185deed5a6b2e44e72ad53d43 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658414335; 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=hTYTfoo1dcWXu/uZwLDGImwFU4H2SePBENqaw/PIHJ0=; b=qp6YX8UYOnBeUHXWQ2QTSJbjfHUqUA6HU0v1tlYXhrN6g6FpbQsL52HDZr/5lnq3cC/tfd VguX5WyxfxxJfmyG29RB8ilNaSrFcojXE8q1bLiE4s2BQK/A8Mar6sZBnJO5A2HX/DTfIM hg2QwcHY8BQ3bkugw/9l+mHg99l63BkaySJPHIMbywzR5ju2hxjwjY7hQLOeYS4V7VQiXC 9ychrCZwTkd2KponNZ+YudvmI0P8uHz5rh+kdKNwUrvGwUj+V7vnRRBf9n3BGxq2xnmgKS jLoYu7qcFRQ5cNqi4Gvz9pYFo7mk/rWDAMDyJwa5dQaqlr3CiuDnVPrpQbiqhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658414335; a=rsa-sha256; cv=none; b=u7ooM8NRT5lKynVhw9LjmFkuFnocoIculAijx8YOl9KknOQN2D/rt5ogVyfajlTUpqODKJ 3KbpRINzif250xlkbE0DdPVeMt5qt/85BfPtArLNOh+UC9SwOXSKwAn1fyOvRFXqeXu/ce sxeES9gQCM1r4B9jfd8GRQrYnx1ndq4QrVmY5P/5ps7vwzeBzUS0iIJ0fLSi1+0BkWaaeL tkQJCQ1SZSaus0l2QAUSb5LllFxjptINdrjKFh+4BBcO8BcPg2/pF172gCQzRdH7h6+luR mZ2tl67kwuFuQG9EXHMthi4z9RLpkN9V1+WRpQ7QSG3Vqau/0p6OfK0OZiWjbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=fb8ef16bab0d23e185deed5a6b2e44e72ad53d43 commit fb8ef16bab0d23e185deed5a6b2e44e72ad53d43 Author: Mike Karels AuthorDate: 2022-07-21 13:10:15 +0000 Commit: Mike Karels CommitDate: 2022-07-21 14:38:17 +0000 IPv4: correct limit on loopback_prefix Commit efe58855f3ea allowed the net.inet.ip.loopback_prefix value to be 32. However, with a 32-bit mask, 127.0.0.1 is not included in the reserved loopback range, which should not be allowed. Change the max prefix length to 31. --- sys/netinet/in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index c3880c4ba983..1c44623bdec1 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -297,7 +297,7 @@ sysctl_loopback_prefixlen(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &preflen, 0, req); if (error || !req->newptr) return (error); - if (preflen < 8 || preflen > 32) + if (preflen < 8 || preflen > 31) return (EINVAL); V_in_loopback_mask = 0xffffffff << (32 - preflen); return (0);