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

(cherry picked from commit b112232e4fb931ebafae9d79fbc970e3df020b57)

Details

Provenance
jfreeAuthored on Apr 10 2024, 2:17 AM
Reviewer
markj
Differential Revision
D44702: uipc_shm: Copyin userpath for ktrace(2)
Parents
rG39664f1b7b56: capsicum.h: Include ktrace.h only in kernel
Branches
Unknown
Tags
Unknown