Page MenuHomeFreeBSD

dsp: Fix a potential use-after-free in dsp_oss_syncstart()
ClosedPublic

Authored by markj on Aug 18 2026, 5:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 20, 3:00 PM
Unknown Object (File)
Sun, Sep 20, 5:05 AM
Unknown Object (File)
Sat, Sep 19, 3:31 PM
Unknown Object (File)
Fri, Sep 18, 4:23 AM
Unknown Object (File)
Thu, Sep 17, 1:57 PM
Unknown Object (File)
Thu, Sep 17, 8:26 AM
Unknown Object (File)
Wed, Sep 16, 4:34 PM
Unknown Object (File)
Tue, Sep 15, 2:36 AM
Subscribers

Details

Summary

This function has a loop where it attempts to lock all channels in a
group. If doing so would block, it releases all locks, sleeps for a
bit, and tries again. However, once the syncgroup lock is dropped,
nothing prevents the syncgroup structure from being freed.

This bug can be exploited to get escalate privileges. Reliable exploitation
likely requires access to more than one PCM device.

Fix the inner loop: after waking up, break out of it unconditionally and
start everything again. I think the old code was also buggy and not
well-exercised: after waking up we'd continue to try and continue
locking channels. Then we'd try again from the beginning and fail to
lock the channels we had already locked.

Reported by: Hazley Samsudin of GovTech CSG

Diff Detail

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

Event Timeline

markj held this revision as a draft.
markj changed the visibility from "Public (No Login Required)" to "Subscribers".Aug 18 2026, 5:00 PM
markj changed the edit policy from "All Users" to "Subscribers".
markj published this revision for review.Aug 18 2026, 5:03 PM
markj edited the summary of this revision. (Show Details)
markj added reviewers: secteam, christos.
markj edited subscribers, added: secteam, christos; removed: imp.
This revision is now accepted and ready to land.Aug 18 2026, 8:21 PM

Please also add an MFC date for this.

Please also add an MFC date for this.

This is going to be committed during our next batch of security advisories, so it'll be insta-MFCed.

markj changed the visibility from "Subscribers" to "Public (No Login Required)".Tue, Aug 25, 5:59 PM
markj changed the edit policy from "Subscribers" to "All Users".