mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmnvhuAACgkQnJ2qBz9k QNn7NQgAhNZiUl5HQ2/+6XjrhrbaLTiwYLFYX36MlVcy6jZZ7PABEn4Iq+dKn19L EQ6WL97yEAOV8A3wdXLnm3J/euf37JlWApuNWqmgA5ZsJ0p14nXKbhd/jcqSf5LF K4afO0OlN6WrPPJxxY2KfiaElgf9bPAhSkX/JvV5pEVyz0CcAjFfgwmNhxrYxIY1 DfQJ/2w7G1VdgpxeO1kVW5REH5NvbsWj9IQSSRS9r1HzTa7E28e3Zn75XWcdab3I pt3E03nuUiyfVTmJXi2/HGNb40XZjH5TCeDrsbjo759ZdiPIvWDUpcTx0+5acOaj b039wWZKKBFTag4KA4yPMkEV37ROiA== =+sU8 -----END PGP SIGNATURE----- Merge tag 'fs_for_v7.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull isofs and udf fixes from Jan Kara: "Several isofs and udf fixes" * tag 'fs_for_v7.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: docs: isofs: replace dead ECMA-119 FTP link udf: reject descriptors with oversized CRC length isofs: use QSTR_LEN() in isofs_cmp isofs: validate block number from NFS file handle in isofs_export_iget isofs: validate Rock Ridge CE continuation extent against volume size
This commit is contained in:
commit
a1a671092d
|
|
@ -57,7 +57,7 @@ Mount options unique to the isofs filesystem.
|
|||
Recommended documents about ISO 9660 standard are located at:
|
||||
|
||||
- http://www.y-adagio.com/
|
||||
- ftp://ftp.ecma.ch/ecma-st/Ecma-119.pdf
|
||||
- https://ecma-international.org/wp-content/uploads/ECMA-119_2nd_edition_december_1987.pdf
|
||||
|
||||
Quoting from the PDF "This 2nd Edition of Standard ECMA-119 is technically
|
||||
identical with ISO 9660.", so it is a valid and gratis substitute of the
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ isofs_export_iget(struct super_block *sb,
|
|||
{
|
||||
struct inode *inode;
|
||||
|
||||
if (block == 0)
|
||||
if (block == 0 || block >= ISOFS_SB(sb)->s_nzones)
|
||||
return ERR_PTR(-ESTALE);
|
||||
inode = isofs_iget(sb, block, offset);
|
||||
if (IS_ERR(inode))
|
||||
|
|
|
|||
|
|
@ -10,20 +10,13 @@
|
|||
#include <linux/gfp.h>
|
||||
#include "isofs.h"
|
||||
|
||||
/*
|
||||
* ok, we cannot use strncmp, as the name is not in our data space.
|
||||
* Thus we'll have to use isofs_match. No big problem. Match also makes
|
||||
* some sanity tests.
|
||||
*/
|
||||
static int
|
||||
isofs_cmp(struct dentry *dentry, const char *compare, int dlen)
|
||||
{
|
||||
struct qstr qstr;
|
||||
qstr.name = compare;
|
||||
qstr.len = dlen;
|
||||
if (likely(!dentry->d_op))
|
||||
return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen);
|
||||
return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr);
|
||||
return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name,
|
||||
&QSTR_LEN(compare, dlen));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -101,6 +101,15 @@ static int rock_continue(struct rock_state *rs)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if ((unsigned)rs->cont_extent >= ISOFS_SB(rs->inode->i_sb)->s_nzones) {
|
||||
printk(KERN_NOTICE "rock: corrupted directory entry. "
|
||||
"extent=%u out of volume (nzones=%lu)\n",
|
||||
(unsigned)rs->cont_extent,
|
||||
ISOFS_SB(rs->inode->i_sb)->s_nzones);
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (rs->cont_extent) {
|
||||
struct buffer_head *bh;
|
||||
|
||||
|
|
|
|||
|
|
@ -230,8 +230,12 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
|
|||
}
|
||||
|
||||
/* Verify the descriptor CRC */
|
||||
if (le16_to_cpu(tag_p->descCRCLength) + sizeof(struct tag) > sb->s_blocksize ||
|
||||
le16_to_cpu(tag_p->descCRC) == crc_itu_t(0,
|
||||
if (le16_to_cpu(tag_p->descCRCLength) + sizeof(struct tag) > sb->s_blocksize) {
|
||||
udf_err(sb, "block %u: CRC length %u exceeds block size\n",
|
||||
block, le16_to_cpu(tag_p->descCRCLength));
|
||||
goto error_out;
|
||||
}
|
||||
if (le16_to_cpu(tag_p->descCRC) == crc_itu_t(0,
|
||||
bh->b_data + sizeof(struct tag),
|
||||
le16_to_cpu(tag_p->descCRCLength)))
|
||||
return bh;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user