]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add validadtion checks for chunk loading
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 3 Jun 2016 19:05:15 +0000 (12:05 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Jun 2016 08:57:09 +0000 (10:57 +0200)
commit214a77d7e1afe25eb4344ec4194976ab619b1dba
treede24cda9966c078446f925c2cd02b60ee7cbeb4c
parenta0e05ee59bc023396472f6f3bc9e04f1cd40a2dd
Btrfs: add validadtion checks for chunk loading

To prevent fuzzed filesystem images from panic the whole system,
we need various validation checks to refuse to mount such an image
if btrfs finds any invalid value during loading chunks, including
both sys_array and regular chunks.

Note that these checks may not be sufficient to cover all corner cases,
feel free to add more checks.

Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Reported-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c