Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hfs: add sanity check for file name length

On a corrupted file system the ->len field could be wrong leading to
a buffer overflow.

Reported-and-acked-by: Clement LECIGNE <clement.lecigne@netasq.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Dan Carpenter and committed by
Linus Torvalds
bc5b8a90 7f80850d

+2
+2
fs/hfs/trans.c
··· 40 40 41 41 src = in->name; 42 42 srclen = in->len; 43 + if (srclen > HFS_NAMELEN) 44 + srclen = HFS_NAMELEN; 43 45 dst = out; 44 46 dstlen = HFS_MAX_NAMELEN; 45 47 if (nls_io) {