Page MenuHomeFreeBSD

sysv_sem: fix the loop that compacts sem array on semaphores removal.
ClosedPublic

Authored by kib on Feb 15 2020, 11:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 4, 3:33 AM
Unknown Object (File)
Wed, Mar 25, 1:49 AM
Unknown Object (File)
Mon, Mar 23, 9:20 PM
Unknown Object (File)
Sun, Mar 22, 3:47 AM
Unknown Object (File)
Sat, Mar 21, 7:52 AM
Unknown Object (File)
Dec 14 2025, 10:34 AM
Unknown Object (File)
Dec 13 2025, 2:40 PM
Unknown Object (File)
Dec 4 2025, 10:20 AM
Subscribers

Details

Summary

As written now, it copies random kernel memory from beyond the bounds of the array.

While there, use designated initialisers for seminfo, and add assert in sem_remove() that sema is sane. [These will be separate commits].

Reported and tested by: pho

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable