Page MenuHomeFreeBSD

uipc_shm: Copyin userpath for ktrace(2)
ClosedPublic

Authored by jfree on Apr 9 2024, 9:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 25, 7:24 AM
Unknown Object (File)
Wed, Mar 25, 4:15 AM
Unknown Object (File)
Sat, Mar 21, 10:48 AM
Unknown Object (File)
Thu, Mar 19, 10:11 PM
Unknown Object (File)
Wed, Mar 11, 6:17 PM
Unknown Object (File)
Feb 28 2026, 6:57 PM
Unknown Object (File)
Feb 26 2026, 3:01 AM
Unknown Object (File)
Feb 17 2026, 10:01 AM
Subscribers

Details

Summary

If userpath is not SHM_ANON, then copy it in early so ktrace(2) can
record it. Without this change, ktrace(2) will attempt to strcpy a
userspace string and trigger a page fault.

Reported by: syzbot+490b9c2a89f53b1b9779@syzkaller.appspotmail.com
Fixes: 0cd9cde767c3
Approved by: markj (mentor)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable