Page MenuHomeFreeBSD

so_splice: Synchronize so_unsplice() with so_splice()
ClosedPublic

Authored by markj on Apr 13 2025, 3:45 PM.
Tags
None
Referenced Files
F151296462: D49814.id.diff
Tue, Apr 7, 9:54 AM
Unknown Object (File)
Sat, Apr 4, 4:06 AM
Unknown Object (File)
Wed, Apr 1, 12:12 AM
Unknown Object (File)
Mon, Mar 30, 9:00 AM
Unknown Object (File)
Sat, Mar 28, 11:16 PM
Unknown Object (File)
Sat, Mar 28, 4:56 PM
Unknown Object (File)
Sat, Mar 28, 11:54 AM
Unknown Object (File)
Wed, Mar 25, 3:26 PM
Subscribers

Details

Summary

so_unsplice() assumed that if SB_SPLICED is set in the receive buffer of
the first socket, then the splice is fully initialized. However, that's
not true, and it's possible for so_unsplice() to race ahead of
so_splice().

Modify so_unsplice() to simply bail if the splice state is embryonic.

Reported by: syzkaller

Diff Detail

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