Page MenuHomeFreeBSD

vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds
AcceptedPublic

Authored by markj on Jun 14 2024, 4:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 4:45 AM
Unknown Object (File)
Sep 30 2024, 3:39 PM
Unknown Object (File)
Sep 27 2024, 6:34 AM
Unknown Object (File)
Sep 26 2024, 2:51 PM
Unknown Object (File)
Sep 23 2024, 4:04 PM
Unknown Object (File)
Sep 22 2024, 2:09 PM
Unknown Object (File)
Sep 21 2024, 5:09 PM
Unknown Object (File)
Sep 21 2024, 4:51 PM
Subscribers

Details

Reviewers
alc
dougm
kib
Summary

vm_phys_enq_chunk() inserts a run of pages into the buddy queues. When
lazy initialization is enabled, only the first page of each run is
initialized; vm_phys_enq_chunk() thus initializes the page following the
just-inserted run.

This fails to account for the possibility that the page following the
run doesn't belong to the segment. Handle that in vm_phys_enq_chunk().

Reported by: KASAN
Reported by: syzbot+1097ef4cee8dfb240e31@syzkaller.appspotmail.com
Fixes: b16b4c22d2d1 ("vm_page: Implement lazy page initialization")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58175
Build 55063: arc lint + arc unit