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
F154217527: D23694.id.diff
Mon, Apr 27, 5:00 AM
Unknown Object (File)
Fri, Apr 24, 3:09 PM
Unknown Object (File)
Tue, Apr 21, 2:03 PM
Unknown Object (File)
Mon, Apr 20, 3:29 PM
Unknown Object (File)
Mon, Apr 13, 10:22 PM
Unknown Object (File)
Mon, Apr 13, 1:46 PM
Unknown Object (File)
Sun, Apr 12, 2:32 AM
Unknown Object (File)
Wed, Apr 8, 12:50 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