NetBSD Problem Report #59741
From www@netbsd.org Thu Oct 30 21:27:36 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CC1BB1A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 30 Oct 2025 21:27:35 +0000 (UTC)
Message-Id: <20251030212734.74E291A923C@mollari.NetBSD.org>
Date: Thu, 30 Oct 2025 21:27:34 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: possible issues in inet_cidr_ntop/pton, inet_net_ntop/pton
X-Send-Pr-Version: www-1.0
>Number: 59741
>Category: lib
>Synopsis: possible issues in inet_cidr_ntop/pton, inet_net_ntop/pton
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 30 21:30:00 +0000 2025
>Last-Modified: Thu Oct 30 23:35:00 +0000 2025
>Originator: Taylor R Campbell
>Release:
>Organization:
The InetBSD Orchards, Inc.
>Environment:
>Description:
We might have the same bugs as FreeBSD had -- FreeBSD patches and new tests here:
https://reviews.freebsd.org/D53488 (inet_cidr_*)
https://cgit.freebsd.org/src/commit/?id=8f4a0d2f7b96099001dbc51e06114df1a0e6d291 (inet_net_*)
(from ivy on libera.chat, haven't investigated any of this myself, not sure exactly what the bugs are, to fill in here when investigated)
>How-To-Repeat:
test cases in freebsd patch
>Fix:
freebsd patch
>Audit-Trail:
From: Lexi Winter <ivy@freebsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/59741
Date: Thu, 30 Oct 2025 21:37:55 +0000
--h1ZS1hTjWKMN5HL7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
NB, after this change there is at least one remaining bug in inet_net_pton:
for IPv4 the input "1.2.3.4/24" produces the output "1.2.3.4/24", while
for IPv6 the input "2001:db8::1/64" produces the output "2001:db8::/64".
i.e., for IPv6 it is stripping the host bits from the output, but for
IPv4, it does not do this. one of these behaviours is wrong, but i have
not yet worked out which.
a couple of trivial utilities which might be useful for testing this:
* https://people.freebsd.org/~ivy/tmp/inet_pton.c
* https://people.freebsd.org/~ivy/tmp/inet_pton6.c
--h1ZS1hTjWKMN5HL7
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaQPasAAKCRD1nT63mIK/
YFKlAQCRFWzuAZNIdox1dg3ZJCaJBr2OFeDYvIwv/xDTaJMMOgD/Wf4Fdof/ycDJ
ZH3x3DfcvQOxr981bL5LG8rYz7rE1Qg=
=h/cN
-----END PGP SIGNATURE-----
--h1ZS1hTjWKMN5HL7--
From: Lexi Winter <lexi@le-fay.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: lib/59741
Date: Thu, 30 Oct 2025 23:22:19 +0000
--+pSexMmp1GT9WmYP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
this change may fix the issue i mentioned in my previous mail:
https://reviews.freebsd.org/D53491
however, this hasn't been reviewed or landed in FreeBSD yet.
--+pSexMmp1GT9WmYP
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQTCo1saHbj4WrlDwSWDli5NAgx6/gUCaQPzKAAKCRCDli5NAgx6
/srlAP9ytYqH1xFbSVEpktNFgLxOninLijwxLDLPTO4xsuf+3QEAjg2jirwxRa5q
/glCyY6pAl/AxMrO1FFlTErrX/wTVgg=
=lH4r
-----END PGP SIGNATURE-----
--+pSexMmp1GT9WmYP--
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.