HomeFreeBSD

uipc_shm: Copyin userpath for ktrace(2)

Description

uipc_shm: Copyin userpath for ktrace(2)

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)
Reviewed by: markj
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44702

Details

Provenance
jfreeAuthored on Apr 10 2024, 2:17 AM
Reviewer
markj
Differential Revision
D44702: uipc_shm: Copyin userpath for ktrace(2)
Parents
rGb18029bc59d2: unionfs_lookup(): fix wild accesses to vnode private data
Branches
Unknown
Tags
Unknown