Elektrine lite

← Feed

@brynet@bsd.network

2026-10-17 22:31 UTC

Heads up, Theo de Raadt has committed some additional tightening of setuid/setgid programs in #OpenBSD -current. :flan_hacker:​ deraadt@ modified src/lib/libc/dlfcn/init.c: libc initialization now aborts if a setuid/setgid program does not have the global variable _permit_setugid declaring that it is setuid/setgid. The more important packages have been fixed, and the long tail will be fixed by people who encounter this problem. ok sthen deraadt@ modified src/lib/libc/dlfcn/init.c: For any binary linked against libc, compare the file setuid/setgid bits against the internal global variable _permit_setugid. If either bit is set in the file mode, but the same bit is not set in the variable, generate a syslog message, output the same to stderr. It looks like this: /usr/bin/x: not supposed to be setuid, aborting [...] More details were revealed in commits made last week laying the groundwork. :flan_thumbs:​ Create the weak global _permit_setugid which must match the setuid/setgid mode of the executable file. This is documented in execve(2). If the corresponding bits are not set right, it means this binary was not intended to be setuid/setgid. The file has become setuid/setgid accidentally, unintentionally, or due to attacker control, and libc will log the event and abort. [...] This change in bsd.prog.mk automatically (based upon BINMODE) creates an additional .c file with the correct variable definition to compile and link into the program, so that we don't need any additional changes in userland base.

Replies (0)

No replies.