opnsense-src/sys/fs/procfs
Konstantin Belousov a08b855dd2 execve_block(): a mechanism for mutual exclusion with execve() on the process
(cherry picked from commit e1a84b7708c2514769625c2af6c5034694013b6a)
(cherry picked from commit dc94d15a7136c4cfe3342c005d8a319f0583ed9a)

proc: Allow to make proc_rwmem() operate on a consistent address space

(cherry picked from commit e1b0d051bbf7e4e730470cbd6622f71a639834c3)
(cherry picked from commit e7578e37d832ecf1eee8cd3fed10df0e0cb1aa7e)

kern_proc.c: ensure stability of the vmspace we read the strings from

(cherry picked from commit a22c044cce41864a32af6b8281a3c416a2664d7f)
(cherry picked from commit 1f062247ef4e920e7fdd1ebe91b4600d69fe1e91)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vmmap

(cherry picked from commit 5fe6e08d2db56b530f0df2903ef24cfabab7b8ea)
(cherry picked from commit e856c10a4d6dfe30a730246b2050d9dd438085db)

kern_proc.c: ensure stability of the vmspace for sysctl kern.proc.vm_layout

(cherry picked from commit 31fa677e4af00b795bf671847b4dc72960c90f14)
(cherry picked from commit da1398dd6962b458fdcf25799fcb512f4d9c070d)

kern_proc.c: make kern.proc.osrel atomic

(cherry picked from commit 80626f34ee985671bb8c60ee986b89587b7a1511)
(cherry picked from commit b3f99ce653d456c9c829359b0dc83c4867f044b7)

kern_proc.c: disallow execve around sysctl kern.proc.kstacks

(cherry picked from commit 8b5abd9027b8b1f6290c756730ee3adebed007f4)
(cherry picked from commit 197f367cdda7919578d15b1562225d6db462c5ad)

kern_proc.c: disallow execve around sysctl kern.proc.rlimit

(cherry picked from commit 5a91fa5a7656c99e527fe7e6f6bf6bd9e85ab589)
(cherry picked from commit 35b95beb06cab0b10a7e3a697931851315fe3dc2)

kern_event: block the target process from execing for sysctl kern.proc.kqueue

(cherry picked from commit 79b384bd8fdff4869ce4799edb0342ff5c25b6fa)
(cherry picked from commit adb14791b752cf0f07dce44d840f01340aa6d6cb)

kern_resource.c: disallow execve around sysctl kern.proc.rlimitusage

(cherry picked from commit 836749817036b90b60af0584fa21f2d9dbd60ff7)
(cherry picked from commit 190d6677b11a1deed6bd0ef14fd4f990eea20f5b)

kern_procctl(PROC_WX_MAPPINGS_PERMIT): ensure stability of the target vmspace

(cherry picked from commit 6a572920f251ac8ac6a80a55d4d039736ea7dd65)
(cherry picked from commit 23ebf0c97ac5fcd6adb6cda8a8707b99257721a6)

linux_prlimit(): block execve for the target

(cherry picked from commit e41c28e67fac9cd22a85b160c5c9d0477ed03600)
(cherry picked from commit a11c4f036c1136ba90fbfda5d2025d18116562d8)

pfs_readdir(): block the target process from execing

(cherry picked from commit 4c0a0909f928baac982b7de4bfa5b5ca7de5291a)
(cherry picked from commit caa2e5cf7cfb07c115d143023ffb21546a60556a)

pseudofs: ensure that the target process vmspace is stable for VOP_READ/WRITE

(cherry picked from commit a4993bac41350e85bc9affb862d2974a1a09bb5e)
(cherry picked from commit ec0d7d01d6c45eff4043cf178addf65d1933d62a)

procfs, linprocfs: ensure target process vmspace stability

(cherry picked from commit 5db31f1b47b586a5091eb41fc957236f28b78dba)
(cherry picked from commit d7d5337291c983ba969e24c95df0bcab46b44621)

sys_set*id(9): wait for the execblocks to pass

(cherry picked from commit d0384f50dad25d3358d76f7556969ea1d515ba68)
(cherry picked from commit 34b95f53e7ac3a055b3d866d101a79e85d0022c4)

kern_exec.c: explicitly include sys/limits.h for UINT_MAX

(cherry picked from commit f5fce0bcc370a9700249e64901eabf2e0be4ecb0)
(cherry picked from commit bb1154f3ea20291b0c02821743084a6f1a7dd844)

Approved by:	so
Security:	FreeBSD-SA-26:39.execve
Security:	CVE-2026-49415
2026-06-30 23:16:26 +02:00
..
procfs.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
procfs.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
procfs_dbregs.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
procfs_fpregs.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
procfs_map.c execve_block(): a mechanism for mutual exclusion with execve() on the process 2026-06-30 23:16:26 +02:00
procfs_mem.c execve_block(): a mechanism for mutual exclusion with execve() on the process 2026-06-30 23:16:26 +02:00
procfs_note.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
procfs_osrel.c uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-11-30 08:55:57 -05:00
procfs_regs.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
procfs_rlimit.c procfs: ensure that RLIMIT_IDENT is properly updated when a limit is added 2024-10-05 10:08:53 +03:00
procfs_status.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
procfs_type.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00