FreeBSD 這次的 execve() 的問題...

在「Local privilege escalation via execve() (via)」這邊看到 FreeBSD 的 LPE,編號 CVE-2026-7270,修正的內容也很簡單,參考「execve: Fix an operator precedence bug - src - FreeBSD source tree」這邊: - args->endp - args->begin_argv + consume); + args->endp - (args-...

Gea-Suan Lin's BLOG

Local privilege escalation via execve()

FreeBSD에서 execve() 시스템 호출의 연산자 우선순위 버그로 인해 버퍼 오버플로우가 발생하고, 이를 통해 권한 없는 사용자가 슈퍼유저 권한을 획득할 수 있는 로컬 권한 상승 취약점(CVE-2026-7270)이 발견되었다. 해당 취약점은 FreeBSD 13, 14, 15 버전의 여러 릴리즈 및 스테이블 브랜치에 영향을 미치며, 현재 패치가 배포되어 있으므로 즉시 시스템을 업데이트하고 재부팅할 것을 권고한다. 우회 방법은 없으며, 패치 적용 후 커널 재컴파일이 필요할 수 있다.

https://www.freebsd.org/security/advisories/FreeBSD-SA-26:13.exec.asc

#freebsd #security #localprivilegeescalation #execve #cve20267270

Upcoming features for #tracexec

#Exec backtrace and jump to parent

In next release, the #TUI will support gathering the exec #backtrace of any exec event, which will greatly simply debugging experience.

The exec backtrace shows the history of a specific event and indicates any ancestor spawns or directly tears itself down and becomes the new process.

Jump to parent is a lighter alternative to backtrace, where you just press `U` to jump to the parent exec evt.

#Linux #eBPF #ptrace #execve

tracexec 0.11.0 released with new timestamp feature and O_CLOEXEC file descriptors are now hidden by default.

#eBPF #linux #ptrace #exec #execve #trace

https://github.com/kxxt/tracexec/releases/tag/v0.11.0

Release v0.11.0 · kxxt/tracexec

New Features tracexec now collects the timestamps of the events. It is currently hidden by default. To show the timestamps inline, use --timestamp option. To control the format of the inline times...

GitHub

@cks

Yes, you might find versions of getopt.c around the place that have an

if (argc < 1)

check. Not this one in the current source code for GCC, though:

https://github.com/gcc-mirror/gcc/blob/83ffe9cde7fe0b4deb0d1b54175fd9b19c38179c/libiberty/getopt.c#L581

#Unix #C #execve #POSIX

gcc/getopt.c at 83ffe9cde7fe0b4deb0d1b54175fd9b19c38179c · gcc-mirror/gcc

Contribute to gcc-mirror/gcc development by creating an account on GitHub.

GitHub

@cks

Psst!

The buggy test program that blocked the EINVAL fix in Linux still has the bug today, two years later.

https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/src/vfs/vfstest.c#n503

Amusingly, the subordinate program is a copy of the same program, and it starts by calling getopt_long_only(), one of whose earliest actions is:

optind = 1; /* Don't scan ARGV[0], the program name. */

followed closely by:

if (optind != argc && !strcmp (argv[optind], "--"))

argc is 0 at this point.

#Unix #C #execve #POSIX

vfstest.c « vfs « src - xfs/xfstests-dev.git - XFSQA testsuite