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)
Fri, Oct 9, 4:49 PM
Unknown Object (File)
Fri, Oct 9, 4:48 PM
Unknown Object (File)
Fri, Oct 9, 4:48 PM
Unknown Object (File)
Fri, Oct 2, 12:31 PM
Unknown Object (File)
Tue, Sep 22, 8:09 AM
Unknown Object (File)
Mon, Sep 21, 5:22 PM
Unknown Object (File)
Mon, Sep 21, 2:24 PM
Unknown Object (File)
Sun, Sep 20, 4:06 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