In OpenBSD 7.4, running ldd on a setuid or setgid executable returns
an error. Why is this?
# ls -l atrm
-r-xr-sr-x 1 root crontab 34864 Oct 10 23:41 atrm
# ldd atrm
atrm:
atrm: Permission denied
atrm: exit status 1
# chmod g-s atrm
# ls -l atrm
-r-xr-xr-x 1 root crontab 34864 Oct 10 23:41 atrm
# ldd atrm
atrm:
Start End Type Open Ref GrpRef Name
00000512c652d000 00000512c6539000 exe 1 0 0 atrm
00000514fad79000 00000514fae73000 rlib 0 1 0
/usr/lib/libc.so.97.1
00000515abed4000 00000515abed4000 ld.so 0 1 0
/usr/libexec/ld.so
Until OpenBSD 7.3, such errors did not occur.
----
Yoshihiro Kawamata
https://fuguita.org/