Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 76476 Build 73359: arc lint + arc unit
Event Timeline
Isn't this more of a theoretical issue than actual?
Still, these changes aren't wrong since we don't really support resid values in the loader.
Yes, I think a read that spanned the end of the device, either truncated image or via a corrupt disk address. And, yes, I think this one is more theoretical.
However, I was working a real problem that led me here. I was working with bhyve vm images and hitting hangs in the loader, which I could see via gdb were in the ufs stack. Eventually it turned out to be that ufs had become corrupt, and that led to an infinite loop in the directory parsing. But I really did want to rule out that the reason for the apparent corruption was that a short read was being ignored. And elsewhere we do have short read checks like these.
Anyway, I also posted D59378 as a more direct solution to hardening the stand ufs directory parsing against corruption.