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, May 9, 10:20 PM
Unknown Object (File)
Fri, May 8, 6:06 PM
Unknown Object (File)
Fri, May 1, 10:41 PM
Unknown Object (File)
Mon, Apr 27, 5:00 AM
Unknown Object (File)
Fri, Apr 24, 3:09 PM
Unknown Object (File)
Apr 21 2026, 2:03 PM
Unknown Object (File)
Apr 20 2026, 3:29 PM
Unknown Object (File)
Apr 13 2026, 10:22 PM
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