🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #424

[Bug 300698] getsockopt(IPV6_NEXTHOP) allocates a user-controlled size (up to 4GB); ifname_linux_to_ifp() truncates unit numbers

#424
From: bugzilla-noreply
Date: Wed, 11 Nov 2026 19:01
40 lines
3401 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300698

            Bug ID: 300698
           Summary: getsockopt(IPV6_NEXTHOP) allocates a user-controlled
                    size (up to 4GB); ifname_linux_to_ifp() truncates unit
                    numbers
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: rbranco@suse.com

Two integer-handling problems in the Linuxulator

  1. linux_getsockopt(), IPV6_NEXTHOP (linux_socket.c)
     The user-supplied optlen is passed unchecked to
     malloc(len, M_SONAME, M_WAITOK). An unprivileged Linux process can pass
     optlen=0xffffffff and make the kernel allocate up to 4 GB of wired
     memory per call 
     Fix: clamp len to SOCK_MAXADDRLEN.

  2. ifname_linux_to_ifp() (linux_if.c)
     The unit number is parsed with (int)strtoul(), so it is truncated:
     "eth4294967296" resolves to eth0. strtoul() also accepts leading
     whitespace and signs, so "eth+0", "eth 0" and "eth-0" resolve to eth0.
     Fix: require a leading digit, parse as u_long, reject > INT_MAX.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-300698-227@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 300698] getsockopt(IPV6_NEXTHOP) allocates a user-controlled
 size (up to 4GB); ifname_linux_to_ifp() truncates unit numbers
Date: Wed, 11 Nov 2026 19:01:21 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-300698-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="92204"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1794423682;
	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=2R5CQu0nBbolAMyxRxdTo49ynSeWnCPzYrxk7F/Hr10=;
	b=i55W9nXbl+8cRAnFSRBT5JOyOoy8Kx0oX3U1OF/6mjaYu1ZhGka4cGUzhhK1gwDmyPja/w
	leqnGRCDJymiBM71GPnMwDsKTwaveFpiXqQLTGjkPNQGOSjon/Y1oP/Y2M1VwMoZS51eRh
	QtftD7PZrD/Ito+aIUtgjPlxJez1Nmii9GgYNueqLjtYWjuCEzO4j3vPxKdfnd6aXLMkTK
	vvNeLEP/OLPPTR0P2lPKckEnUdpAfoSnK9DzuBPMPea0IYucgAURHgSThcX/8KKT7qU7LE
	6TAcK6hAK3NfLDYX73S0cEEknAlMslSA8xSpZGXiBSoMRp+XV9MaxB6hgJPiUQ==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes