summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorJeff Liu <jeff.liu@oracle.com>2011-08-31 12:35:51 +0800
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:59 -0400
commit521770b7a9bef17dcbcee514da5052b3e06120d2 (patch)
treef92003fd9a8ca185401d062729862c83044f4bf8 /ctree.h
parent3d7c94cfec7347e663106d2ca9db2b60dc9d8213 (diff)
Btrfs-progs: specify label length larger than 255 bytes cause mkfs.btrfs buffer overflow
Hello, While going through the mkfs.c, I noticed there is an issue for label length checking, mkfs.btrfs will crashed if the label length exceeding 255 bytes, it's easy to triggered that out as below: jeff@pibroch:~/opensource/btrfs-progs$ sudo ./mkfs.btrfs -L `perl -e 'print "A"x256'` /usr/src/linux-3.0/img0 WARNING! - Btrfs v0.19-35-g1b444cd IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using *** buffer overflow detected ***: ./mkfs.btrfs terminated ======= Backtrace: ========= /lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x50)[0xb7774df0] /lib/i386-linux-gnu/libc.so.6(+0xe4cca)[0xb7773cca] /lib/i386-linux-gnu/libc.so.6(__strcpy_chk+0x3f)[0xb777305f] ./mkfs.btrfs[0x805acc4] ./mkfs.btrfs[0x805def6] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0xb76a5e37] ./mkfs.btrfs[0x8048ef1] ======= Memory map: ======== ...... a tiny patch could fix it. Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Diffstat (limited to 'ctree.h')
0 files changed, 0 insertions, 0 deletions