Thread View: muc.lists.freebsd.bugs
2 messages
2 total messages
Started by bugzilla-noreply
Wed, 11 Nov 2026 19:01
[Bug 300698] getsockopt(IPV6_NEXTHOP) allocates a user-controlled size (up to 4GB); ifname_linux_to_ifp() truncates unit numbers
Author: bugzilla-noreply
Date: Wed, 11 Nov 2026 19:01
Date: Wed, 11 Nov 2026 19:01
40 lines
3401 bytes
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
[Bug 300698] getsockopt(IPV6_NEXTHOP) allocates a user-controlled size (up to 4GB); ifname_linux_to_ifp() truncates unit numbers
Author: bugzilla-noreply
Date: Wed, 11 Nov 2026 19:06
Date: Wed, 11 Nov 2026 19:06
16 lines
2613 bytes
2613 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300698
Mark Linimon <linimon@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|bugs@FreeBSD.org |emulation@FreeBSD.org
--
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads