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)
Dec 27 2024, 1:53 PM
Unknown Object (File)
Nov 7 2024, 12:03 PM
Unknown Object (File)
Sep 24 2024, 7:31 AM
Unknown Object (File)
Sep 21 2024, 7:01 PM
Unknown Object (File)
Sep 21 2024, 5:47 AM
Unknown Object (File)
Sep 18 2024, 12:09 AM
Unknown Object (File)
Sep 10 2024, 3:13 PM
Unknown Object (File)
Sep 10 2024, 2:41 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.