Page MenuHomeFreeBSD

Allow negative aio_offset only for the read and write LIO ops on device nodes.
ClosedPublic

Authored by kib on Jun 18 2017, 8:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:15 AM
Unknown Object (File)
Feb 26 2024, 1:12 PM
Unknown Object (File)
Feb 3 2024, 1:16 PM
Unknown Object (File)
Jan 6 2024, 2:54 AM
Unknown Object (File)
Dec 20 2023, 6:36 AM
Unknown Object (File)
Nov 29 2023, 11:51 PM
Unknown Object (File)
Nov 6 2023, 7:04 PM
Unknown Object (File)
Oct 22 2023, 3:30 AM
Subscribers

Details

Summary

Otherwise, the current check of aio_offset == -1LL makes it possible to pass negative file offsets down to the filesystems. This trips assertions and is even unsafe for e.g. FFS which keeps metadata at negative offsets.

Test Plan

Peter Holm found this with fuzzing and confirmed that the issue is fixed. He also run AIO regression tests.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jun 19 2017, 2:23 PM
This revision was automatically updated to reflect the committed changes.