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)
Wed, Apr 23, 5:01 AM
Unknown Object (File)
Tue, Apr 22, 10:18 AM
Unknown Object (File)
Fri, Apr 18, 9:09 PM
Unknown Object (File)
Mon, Apr 14, 7:55 AM
Unknown Object (File)
Fri, Apr 11, 11:09 PM
Unknown Object (File)
Mar 11 2025, 8:35 AM
Unknown Object (File)
Feb 25 2025, 1:09 AM
Unknown Object (File)
Dec 11 2024, 5:27 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