From nobody Thu Oct 29 20:59:35 2026 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 4jFxSF0mm6z6xfDG for ; Thu, 29 Oct 2026 20:59:41 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFxSD4qqrz4TfY for ; Thu, 29 Oct 2026 20:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793307580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ntVEe8F9pg4uqgrnwXs3EyQaKHUa/wcaYLXKrCHKYw=; b=OUcBWX1BQEsUJVcEweRO+dXft/7TwXHFBtWSlbOOkSpO1gEsUnlHHabe2QlW/MFSCKDrxz snfh5B59NEPdf6zeIV3qTAGyTy8d5OeryNXEJ5aPtcmPjukO4Of7fqi8OxrgLwYAtY1jEA e9aeUnX4iL0Y8cA76BqJWMliJ2s3gf2YF8VQOK34mtVkwlay9d3HD5v4z0CcZeEmTHWUiD jlxvvYnIYu4b9ZD95ZnUJlXsiEbP8OlYTwurNdkD89GNoNPPC6ZPB52Gkv7pXz1/C3u5V2 iQ4C+rJ/8rLQcQRVht5pFKq+vJpL6j9lzRbW6Qzn0Joddu2jlKBNJ9q76Lun3w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793307580; b=EH7flNnm7C+jYefdf2Irt+pZalT18ts3pBQfQHAWwob4bxcQT9yBnaJIqsihNOyScB7pCG YJhc/ofXdikbOEcgX7Mnsn7zfSsA72jUNC1OYU8PGnVtMLWtWrAXrWYPjwyAXdekeVFw0Q 0YZcIUxTk6LWppNfGbTJoHFwfnvQK1dyUfLl8raNFupdLT1lFBwaQ11UBY9VEsb8EmFrG1 l2rtME0AQltr5DLkJWsCxow0VApsMzcohPxceIqz3JhsojDg8WFiCtv6/FQsNnUsC5NwIw udKcmTcrpmR+WZwU2qS9tioYpEz/65ZvVedbF27oG5/gi4noiQ2m6hnDBfkwQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793307580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ntVEe8F9pg4uqgrnwXs3EyQaKHUa/wcaYLXKrCHKYw=; b=UdtxLRA3JFMHT5PsDycWNGqDfKcUlHvalRsic3JCSO7UxWGl1+Mp3/HoVpEy3bXacw3MUi H5KfTn1bBEoNRoW9wxht//L6Cki5orIwDzj+gyHBRmwF8YRp+ihj/KcX5Y6pwRLZeTgHBl 92jNXBPx0gDCNtYYeYZA4Tkdylqrzlf4FkT7DDj6o0RQ59m4edxcBpIFgifRruN5hbjDX6 40ohw0rHsnvW/wdFtMyWWhYmT/ajzK6EyM6RAcE/92mXEzhRV/qEc0XV3cKB2gYyMhGjBl h9ACMPzDBA16EAGttoc41YYHC2ChPu9NJXrhmRIGmJCTxb6vjovknMmdeM/J8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFxSD4TBDzwZw for ; Thu, 29 Oct 2026 20:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 239ce by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 20:59:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Osvaldo Janeri Filho From: Maxim Konovalov Subject: git: b5e57452b62e - main - bsnmp: zero-fill the destination on a short ASN.1 IpAddress List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5e57452b62e7c185706ed8b2a86e9f8ac483357 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 20:59:35 +0000 Message-Id: <6ae3b3b7.239ce.7ed10ef9@gitrepo.freebsd.org> The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e57452b62e7c185706ed8b2a86e9f8ac483357 commit b5e57452b62e7c185706ed8b2a86e9f8ac483357 Author: Osvaldo Janeri Filho AuthorDate: 2026-10-29 18:05:14 +0000 Commit: Maxim Konovalov CommitDate: 2026-10-29 20:58:10 +0000 bsnmp: zero-fill the destination on a short ASN.1 IpAddress asn_get_ipaddress_raw() meant to pad the 4-byte buffer after a short copy, but the loop bound was the already-reached len and never ran, leaving addr[len..3] uninitialised. Pad to 4. This is harmless for the in-tree consumers (bsnmpd(1) and libbsnmpclient) which zero the PDU before decoding it. Reviewed by: harti, maxim Approved by: harti MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D60923 --- contrib/bsnmp/lib/asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index f1f9267c0226..5f2419e8ba1a 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -777,7 +777,7 @@ asn_get_ipaddress_raw(struct asn_buf *b, asn_len_t len, u_char *addr) asn_error(b, "short length for ip-Address %u", len); for (i = 0; i < len; i++) *addr++ = *b->asn_cptr++; - while (i++ < len) + while (i++ < 4) *addr++ = 0; b->asn_len -= len; return (ASN_ERR_BADLEN);