Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922070 - sys-apps/util-linux-2.39.3-r1 crash run command 'lsns -t net -T'
Summary: sys-apps/util-linux-2.39.3-r1 crash run command 'lsns -t net -T'
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-13 22:44 UTC by Loty Gero
Modified: 2024-01-16 21:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,34.06 KB, text/plain)
2024-01-14 00:24 UTC, Loty Gero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loty Gero 2024-01-13 22:44:02 UTC
run command 

'lsns -t net -T'

crashed

Reproducible: Always

Steps to Reproduce:
run

lsns -t net -T
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-13 22:45:07 UTC
It works for me with sys-apps/util-linux-2.39.3-r1.

* Please share the output.
* What version of util-linux?
* emerge --info please
* Can you get a backtrace? (https://wiki.gentoo.org/wiki/Debugging#Per-package)
Comment 2 Loty Gero 2024-01-14 00:24:16 UTC
Created attachment 882218 [details]
emerge --info
Comment 3 Loty Gero 2024-01-14 00:29:47 UTC
lsns -t net -T
Ошибка сегментирования (образ памяти сброшен на диск)

sys-apps/util-linux 2.39.3-r1

-abi_x86_32
+audit
-build
+caps
+cramfs
+cryptsetup
-fdformat
+hardlink
+kill
+logger
+magic
+ncurses
+nls
+pam
+python
+python_targets_python3_10
+python_targets_python3_11
+readline
+slang
+static-libs
+su
+suid
+systemd
-test
+tty-helpers
+udev
+verify-sig
Comment 4 Mike Gilbert gentoo-dev 2024-01-16 18:23:09 UTC
Please get a back trace as requested.
Comment 5 Mike Gilbert gentoo-dev 2024-01-16 18:24:22 UTC
> Ошибка сегментирования (образ памяти сброшен на диск)

This appears to be Russian for a segfault with core dump.
Comment 6 Loty Gero 2024-01-16 18:41:40 UTC
Process 2785081 (lsns) of user 0 dumped core.
                                                          
                                                          Module libcrypt.so.2 without build-id.
                                                          Module libnss_systemd.so.2 without build-id.
                                                          Module libcap.so.2 without build-id.
                                                          Module libz.so.1 without build-id.
                                                          Module libm.so.6 without build-id.
                                                          Module libudev.so.1 without build-id.
                                                          Module libjson-c.so.5 without build-id.
                                                          Module libargon2.so.1 without build-id.
                                                          Module libcrypto.so.3 without build-id.
                                                          Module libssl.so.3 without build-id.
                                                          Module libdevmapper.so.1.02 without build-id.
                                                          Module libuuid.so.1 without build-id.
                                                          Module libcryptsetup.so.12 without build-id.
                                                          Module libblkid.so.1 without build-id.
                                                          Module ld-linux-x86-64.so.2 without build-id.
                                                          Module libc.so.6 without build-id.
                                                          Module libmount.so.1 without build-id.
                                                          Module libsmartcols.so.1 without build-id.
                                                          Module lsns without build-id.
                                                          Stack trace of thread 2785081:
                                                          #0  0x00005579f40e8d21 interpolate_missing_namespaces (lsns + 0x5d21)
                                                          #1  0x00005579f40e8129 main (lsns + 0x5129)
                                                          #2  0x00007fb72d4beeea __libc_start_call_main (libc.so.6 + 0x23eea)
                                                          #3  0x00007fb72d4befa5 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x23fa5)
                                                          #4  0x00005579f40e81c1 _start (lsns + 0x51c1)
                                                          ELF object binary architecture: AMD x86-64


Starting program: /usr/bin/lsns -t net -T
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555555559d21 in interpolate_missing_namespaces ()
Comment 7 Mike Gilbert gentoo-dev 2024-01-16 19:16:26 UTC
Your gdb output seems incomplete.

Please rebuild util-linux using the instructions provided at the link above.
Comment 8 Loty Gero 2024-01-16 19:47:33 UTC
gdb --args /usr/bin/lsns -t net -T

Reading symbols from /usr/bin/lsns...
(gdb) run
Starting program: /usr/bin/lsns -t net -T
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffa9e0 "") at /usr/include/bits/stdio2.h:54
54        return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
(gdb)
Comment 9 Mike Gilbert gentoo-dev 2024-01-16 20:03:59 UTC
Please type "bt".
Comment 10 Loty Gero 2024-01-16 20:44:16 UTC
(gdb) run
Starting program: /usr/bin/lsns -t net -T
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffae20 "") at /usr/include/bits/stdio2.h:54
54	  return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
(gdb) bt
#0  0x0000555555559d21 in snprintf (__fmt=0x5555555640d0 "/proc/%d/ns/%s", __n=8192, __s=0x7fffffffae20 "") at /usr/include/bits/stdio2.h:54
#1  interpolate_missing_namespaces (ls=ls@entry=0x7fffffffcf00, orphan=<optimized out>, rela=rela@entry=1) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:799
#2  0x0000555555559129 in read_related_namespaces (ls=0x7fffffffcf00) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:869
#3  read_namespaces (ls=0x7fffffffcf00) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:940
#4  main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/sys-apps/util-linux-2.39.3-r1/util-linux-2.39.3/sys-utils/lsns.c:1498
(gdb)
Comment 11 Mike Gilbert gentoo-dev 2024-01-16 21:38:19 UTC
It looks like one of the pointer arguments for snprintf is pointed at some memory that isn't owned by the process. Someone would need to debug the process interactively to further diagnose the issue.