HomeFreeBSD

udf: Reject read requests with an invalid length

Description

udf: Reject read requests with an invalid length

  • If the size is negative or if rounding it up to a multiple of the block size overflows, fail the read request with ERANGE.
  • While here, add a sanity check that the ICB length for the root directory is at least as long as a minimum-sized file entry.

PR: 257768
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 1 week
Sponsored by: FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41220

(cherry picked from commit c70e615051b00671d54651d99af5cdec4b091d92)

Details

Provenance
jhbAuthored on Aug 4 2023, 11:40 PM
Differential Revision
D41220: udf: Reject read requests with an invalid length
Parents
rG21ccba43f511: ptrace: Clear TDB_BORN during PT_DETACH.
Branches
Unknown
Tags
Unknown