Bug 53687 - tcpdump -Z root immediately exits 1
Summary: tcpdump -Z root immediately exits 1
Status: ASSIGNED
Alias: None
Product: Sisyphus
Classification: Development
Component: tcpdump (show other bugs)
Version: unstable
Hardware: x86 Linux
: P5 normal
Assignee: Arseny Maslennikov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-01 06:35 MSK by Vitaly Chikunov
Modified: 2025-04-02 14:02 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Chikunov 2025-04-01 06:35:24 MSK
В версии 4.99.4-alt1 ещё можно было делать `-Z root`, чтоб отключить утрату привилегий. tcpdump(8) отмечает:

  -Z user
  --relinquish-privileges=user
      If  tcpdump  is running as root, after opening the capture device
      or input savefile, but before opening any savefiles  for  output,
      change  the user ID to user and the group ID to the primary group
      of user.

      This behavior is enabled by default (-Z tcpdump), and can be dis‐
      abled by -Z root.

С версии 4.99.5-alt1 это поведение больше невозможно отключить при наличии savefile.

  root@x86_64:~# tcpdump -Z root -p -w a
  tcpdump: Chroot without dropping root is insecure
  root@x86_64:~# echo $?
  1

💁‍♂️
Comment 1 Arseny Maslennikov 2025-04-02 14:02:06 MSK
Старый патч https://git.altlinux.org/gears/t/tcpdump.git?p=tcpdump.git;a=commit;h=f4d2a85d068ccbf9ae6dd73774c76ed0d81828ab перестал выполнять свою функцию, надо переделать.