Looks like culprit is libnss_resonve.so.
First of all, to reproduce, I have to use hostname like google.com. If I
give traceroute an IP address, there are no setsockopt calls that needs
net_admin cap.
Here's gdb log, breakpointed on setsockopt, dumped registers (you can
see rdx set to "33" so that's one of SO_RCVBUFFORCE/SO_SNDBUFFORCE), and
backtrace, that leads to /lib/x86_64-linux-gnu/libnss_resolve.so.2:
Breakpoint 1 (setsockopt) pending.
Starting program: /usr/sbin/traceroute -T google.com
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, setsockopt () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
rax 0x34000 212992
rbx 0x55ad9953abe0 94204090100704
rcx 0x7ffc27aac6d0 140720973989584
rdx 0x21 33
rsi 0x1 1
rdi 0x3 3
rbp 0x7ffc27aac6d0 0x7ffc27aac6d0
rsp 0x7ffc27aac6c8 0x7ffc27aac6c8
r8 0x4 4
r9 0x0 0
r10 0x7ffc27aac6d0 140720973989584
r11 0x202 514
r12 0x3 3
r13 0x7ffc27aac6d4 140720973989588
r14 0x7ffc27aac760 140720973989728
r15 0x55ad9953abe0 94204090100704
rip 0x7f057a78a320 0x7f057a78a320 <setsockopt>
eflags 0x293 [ CF AF SF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
#0 setsockopt () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f057af2cd43 in ?? () from /lib/x86_64-linux-gnu/libnss_resolve.so.2
#2 0x00007f057af1ccd5 in ?? () from /lib/x86_64-linux-gnu/libnss_resolve.so.2
#3 0x00007f057af46f02 in ?? () from /lib/x86_64-linux-gnu/libnss_resolve.so.2
#4 0x00007f057af2287d in _nss_resolve_gethostbyname4_r () from
/lib/x86_64-linux-gnu/libnss_resolve.so.2
#5 0x00007f057a76e16f in gaih_inet (name=name@entry=0x7ffc27aae76e
"google.com", service=<optimized out>, req=req@entry=0x7ffc27aad400,
pai=pai@entry=0x7ffc27aacf28, naddrs=naddrs@entry=0x7ffc27aacf24,
tmpbuf=tmpbuf@entry=0x7ffc27aacf90) at ../sysdeps/posix/getaddrinfo.c:848
#6 0x00007f057a770448 in __GI_getaddrinfo (name=<optimized out>,
service=<optimized out>, hints=0x7ffc27aad400, pai=0x7ffc27aad3f8) at
../sysdeps/posix/getaddrinfo.c:2391
#7 0x000055ad9791e326 in ?? ()
#8 0x000055ad9791e4b3 in ?? ()
#9 0x000055ad97921cae in ?? ()
#10 0x000055ad9791a7d1 in ?? ()
#11 0x00007f057a6a13f1 in __libc_start_main (main=0x55ad9791a700, argc=3,
argv=0x7ffc27aad888, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7ffc27aad878)
at ../csu/libc-start.c:291
#12 0x000055ad9791b3fa in ?? ()
** Also affects: systemd (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/1703649
Title:
Traceroute needs net_admin capability for unknown reason
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1703649/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs