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
F132239087: D23694.id.diff
Wed, Oct 15, 2:24 AM
F132236686: D23694.id68378.diff
Wed, Oct 15, 1:54 AM
F132234099: D23694.id68350.diff
Wed, Oct 15, 1:21 AM
Unknown Object (File)
Tue, Oct 14, 1:58 AM
Unknown Object (File)
Sat, Sep 27, 5:32 AM
Unknown Object (File)
Tue, Sep 16, 7:15 PM
Unknown Object (File)
Aug 23 2025, 8:01 PM
Unknown Object (File)
Jul 22 2025, 6:52 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