]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sem_remove(): fix the loop that compacts sem array on semaphores removal.
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 15 Feb 2020 23:19:23 +0000 (23:19 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 15 Feb 2020 23:19:23 +0000 (23:19 +0000)
commita7b61c0af130fea647be9480a99b96d019a56baf
treed04233e57a3cd439a2f0053c347e279e7a0d2cdf
parent4cb6ea7e8e3a86f3162baeff92504d0c0ecc6986
sem_remove(): fix the loop that compacts sem array on semaphores removal.

As written now, it copies random kernel memory from beyond the bounds
of the array.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23694
sys/kern/sysv_sem.c