HomeFreeBSD

msdosfs: Prevent buffer overflow when expanding win95 names

Description

msdosfs: Prevent buffer overflow when expanding win95 names

In win2unixfn() we expand Windows 95 style long names. In some cases that
requires moving the data in the nbp->nb_buf buffer backwards to make room. That
code failed to check for overflows, leading to a stack overflow in win2unixfn().

We now check for this event, and mark the entire conversion as failed in that
case. This means we present the 8 character, dos style, name instead.

PR: 204643
Differential Revision: https://reviews.freebsd.org/D6015

Details

Provenance
kpAuthored on Apr 26 2016, 8:36 PM
Parents
rGdcbee68850de: radix_mpath: Don't derefence a NULL pointer in for loop iteration
Branches
Unknown
Tags
Unknown

Event Timeline