util-linux/disk-utils
Tobias Stoeckmann 7cb962c770 fsck.cramfs: Fix bus error on broken file system.
The utility fsck.cramfs is prone to a bus error on file systems for
big endian systems with non-standard header sizes. While calculating
the crc32 checksum, it does not properly handle a possible offset
for bootcodes, resulting in out of boundary access of mmap'ed area.

You can trigger the issue with the following commands:

$ mkdir -p cramfs-poc/root/subdir
$ cd cramfs-poc
$ mkfs.cramfs -p -N big root cramfs
$ echo -ne \\00\\x4c | dd of=cramfs bs=1 seek=518 count=2 conv=notrunc
$ fsck.cramfs cramfs

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-11-02 13:56:14 +01:00
..
Makemodule.am partx: move partx.h to include/ 2017-07-14 11:34:55 +02:00
addpart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
addpart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
blockdev.8 blockdev: document --setro more properly 2017-08-14 11:30:37 +02:00
blockdev.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
cfdisk.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
cfdisk.c cfdisk: cleanup die-on-signal code 2017-09-26 12:47:50 +02:00
cramfs.h cramfs.h: coding style 2011-07-21 23:50:04 +02:00
cramfs_common.c mkfs.cramfs: fix compiler warning [-Wmissing-prototypes] 2012-07-16 18:57:30 +02:00
delpart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
delpart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
fdformat.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fdformat.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
fdisk-list.c libblkid: don't use CDROM_GET_CAPABILITY ioctl for DM devices 2017-07-12 14:35:53 +02:00
fdisk-list.h sfdisk: support empty label use-case 2016-11-30 13:01:33 +01:00
fdisk-menu.c fdisk: (gpt) make PMBR accessible from main menu 2017-11-02 11:17:24 +01:00
fdisk.8 fdisk: add to the man page missing option 2017-05-09 13:05:26 +02:00
fdisk.c fdisk: use strutils to trim whitespace from input 2017-08-29 15:26:39 +02:00
fdisk.h fdisk: fix readline interaction with signals 2017-08-24 15:48:46 +02:00
fsck.8 fsck: add --help and --version 2017-06-22 21:34:51 +02:00
fsck.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
fsck.cramfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fsck.cramfs.c fsck.cramfs: Fix bus error on broken file system. 2017-11-02 13:56:14 +01:00
fsck.minix.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fsck.minix.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
isosize.8 isosize: iterate over all arguments even when something fails 2017-08-21 11:11:11 +02:00
isosize.c isosize: usage() and coding style cleanup 2017-08-21 11:16:51 +02:00
minix_programs.h minix: change types in header file 2012-12-19 11:38:51 +01:00
mkfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.bfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.bfs.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkfs.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkfs.cramfs.8 docs: remove some old history from manpages 2017-06-29 12:56:22 +02:00
mkfs.cramfs.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkfs.minix.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.minix.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkswap.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkswap.c misc: replace magic number 37 with UUID_STR_LEN 2017-09-05 11:49:21 +02:00
partx.8 partx: add --list-types option 2017-05-02 23:22:04 +01:00
partx.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
raw.8 docs: try to convince open(2) O_DIRECT rather than using raw device 2017-05-02 23:22:04 +01:00
raw.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
resizepart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
resizepart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
sfdisk.8 sfdisk: allow to disable bootable flag on all partitions 2017-11-02 13:50:30 +01:00
sfdisk.c sfdisk: allow to disable bootable flag on all partitions 2017-11-02 13:50:30 +01:00
swaplabel.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
swaplabel.c swaplabel: fix --disable-libuuid compilation 2017-09-15 13:30:40 +02:00