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
F172131062: D23694.id.diff
Wed, Sep 16, 8:41 AM
Unknown Object (File)
Wed, Sep 16, 5:11 AM
Unknown Object (File)
Tue, Sep 15, 12:36 PM
Unknown Object (File)
Wed, Sep 9, 10:06 AM
Unknown Object (File)
Sat, Sep 5, 7:51 PM
Unknown Object (File)
Thu, Sep 3, 12:39 AM
Unknown Object (File)
Wed, Sep 2, 11:38 PM
Unknown Object (File)
Wed, Sep 2, 5:07 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