aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-02-08 12:10:54 -0500
committerJan Kara <jack@suse.cz>2018-02-16 05:15:09 -0500
commit67621675e9636ed272a4f0235215accdfbc99768 (patch)
treea541912ca630b90ec66a8cb18a3ecc5d3c5b18e3 /fs/udf
parent7b568cba4f0af32522f84c1378e71a47a9c61bb0 (diff)
udf: Allow volume descriptor sequence to be terminated by unrecorded block
According to ECMA-167 3/8.4.2 a volume descriptor sequence can be terminated also by an unrecorded block within the extent of volume descriptor sequence. Currently we errored out in such case making such volumes unmountable. Handle that case by treating any invalid block as a block terminating the sequence. Reported-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/super.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index f80b97173acd..456d737fc7ca 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1627,12 +1627,8 @@ static noinline int udf_process_sequence(
1627 for (; (!done && block <= lastblock); block++) { 1627 for (; (!done && block <= lastblock); block++) {
1628 1628
1629 bh = udf_read_tagged(sb, block, block, &ident); 1629 bh = udf_read_tagged(sb, block, block, &ident);
1630 if (!bh) { 1630 if (!bh)
1631 udf_err(sb, 1631 break;
1632 "Block %llu of volume descriptor sequence is corrupted or we could not read it\n",
1633 (unsigned long long)block);
1634 return -EAGAIN;
1635 }
1636 1632
1637 /* Process each descriptor (ISO 13346 3/8.3-8.4) */ 1633 /* Process each descriptor (ISO 13346 3/8.3-8.4) */
1638 gd = (struct generic_desc *)bh->b_data; 1634 gd = (struct generic_desc *)bh->b_data;