Public bug reported:

On Ubuntu 26.04 (resolute), any tool using libfalcosecurity0t64
0.20.0-4ubuntu0.1 aborts during the initial /proc scan as soon as it
encounters a process with an IPv6 TCP socket:

  *** buffer overflow detected ***: terminated

glibc 2.42 added fortification for inet_ntop (__inet_ntop_chk), and
libsinsp 0.20.0 passes an incorrect buffer size for IPv6 addresses.
libsinsp.so.0 in this package imports __inet_ntop_chk@GLIBC_2.42. IPv4
sockets are processed fine; the abort happens on the first IPv6 (tcp6)
socket.

Steps to reproduce:
1. sudo apt install falcosecurity-scap-dkms sysdig
2. sudo modprobe scap
3. Have any process with an IPv6 TCP connection open (e.g. a web browser)
4. sudo sysdig -n 5

Expected: events are captured.
Actual: immediate abort with "*** buffer overflow detected ***: terminated".

The same crash occurs in Stratoshark's falcodump extcap (falcodump
--extcap-interfaces), so Stratoshark cannot capture live system calls on
26.04.

Fix:
Fixed upstream in falcosecurity/libs PR #2574 (issue #2573), which uses 
INET6_ADDRSTRLEN for the buffer size. Tracked in Debian as bug #1115247. Gentoo 
carries this as a backport patch for 0.20.0. Ubuntu 26.10 and later ship 
0.23.2, which should already include the fix.

Requesting an SRU of that patch to 0.20.0 for resolute, since 26.04 LTS
packages (sysdig, stratoshark) are built against 0.20.0 and cannot use
0.23.

Versions:
- libfalcosecurity0t64 0.20.0-4ubuntu0.1
- falcosecurity-scap-dkms 0.20.0-4ubuntu0.1
- sysdig 0.40.0+repack-3
- libc6 2.43-2ubuntu2.7
- kernel 7.2.15

Note: tested on Pop!_OS 26.04, which uses the unmodified Ubuntu archive
for these packages (no Pop!_OS changes to falcosecurity-libs, sysdig or
libc6).

** Affects: falcosecurity-libs (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2178391

Title:
  libsinsp aborts with "buffer overflow detected" (inet_ntop fortify) on
  glibc 2.42+, sysdig and Stratoshark unusable on 26.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/falcosecurity-libs/+bug/2178391/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to