linux/block/partitions/mac.c
Kees Cook 8412886a3e mac: validate mac_partition is within sector
commit 02e2a5bfeb upstream.

If md->signature == MAC_DRIVER_MAGIC and md->block_size == 1023, a single
512 byte sector would be read (secsize / 512). However the partition
structure would be located past the end of the buffer (secsize % 512).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
2015-12-18 16:06:30 +00:00

142 lines
3.5 KiB