<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/isofs/inode.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-04-13T10:50:15Z</updated>
<entry>
<title>isofs: handle CDs with bad root inode but good Joliet root directory</title>
<updated>2024-04-13T10:50:15Z</updated>
<author>
<name>Alex Henrie</name>
</author>
<published>2024-02-08T02:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b02e6ba55997926c961a95cdaf9de91f75b0b5c3'/>
<id>urn:sha1:b02e6ba55997926c961a95cdaf9de91f75b0b5c3</id>
<content type='text'>
[ Upstream commit 4243bf80c79211a8ca2795401add9c4a3b1d37ca ]

I have a CD copy of the original Tom Clancy's Ghost Recon game from
2001. The disc mounts without error on Windows, but on Linux mounting
fails with the message "isofs_fill_super: get root inode failed". The
error originates in isofs_read_inode, which returns -EIO because de_len
is 0. The superblock on this disc appears to be intentionally corrupt as
a form of copy protection.

When the root inode is unusable, instead of giving up immediately, try
to continue with the Joliet file table. This fixes the Ghost Recon CD
and probably other copy-protected CDs too.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20240208022134.451490-1-alexhenrie24@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>isofs: Fix out of bound access for corrupted isofs image</title>
<updated>2021-11-12T13:40:50Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2021-10-18T10:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0ddff8d68f2e43857a84dce54c3deab181c8ae1'/>
<id>urn:sha1:b0ddff8d68f2e43857a84dce54c3deab181c8ae1</id>
<content type='text'>
commit e96a1866b40570b5950cda8602c2819189c62a48 upstream.

When isofs image is suitably corrupted isofs_read_inode() can read data
beyond the end of buffer. Sanity-check the directory entry length before
using it.

Reported-and-tested-by: syzbot+6fc7fb214625d82af7d1@syzkaller.appspotmail.com
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>isofs: joliet: Fix iocharset=utf8 mount option</title>
<updated>2021-09-22T09:47:49Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2021-08-08T16:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=891ab1769ff1cc40fff0fcea0f4b359f115effde'/>
<id>urn:sha1:891ab1769ff1cc40fff0fcea0f4b359f115effde</id>
<content type='text'>
[ Upstream commit 28ce50f8d96ec9035f60c9348294ea26b94db944 ]

Currently iocharset=utf8 mount option is broken. To use UTF-8 as iocharset,
it is required to use utf8 mount option.

Fix iocharset=utf8 mount option to use be equivalent to the utf8 mount
option.

If UTF-8 as iocharset is used then s_nls_iocharset is set to NULL. So
simplify code around, remove s_utf8 field as to distinguish between UTF-8
and non-UTF-8 it is needed just to check if s_nls_iocharset is set to NULL
or not.

Link: https://lore.kernel.org/r/20210808162453.1653-5-pali@kernel.org
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>isofs: reject hardware sector size &gt; 2048 bytes</title>
<updated>2018-08-21T09:37:41Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2018-08-17T02:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09a4e0be5826aa66c4ce9954841f110ffe63ef4f'/>
<id>urn:sha1:09a4e0be5826aa66c4ce9954841f110ffe63ef4f</id>
<content type='text'>
The largest block size supported by isofs is ISOFS_BLOCK_SIZE (2048), but
isofs_fill_super calls sb_min_blocksize and sets the blocksize to the
device's logical block size if it's larger than what we ended up with after
option parsing.

If for some reason we try to mount a hard 4k device as an isofs filesystem,
we'll set opt.blocksize to 4096, and when we try to read the superblock
we found via:

        block = iso_blknum &lt;&lt; (ISOFS_BLOCK_BITS - s-&gt;s_blocksize_bits)

with s_blocksize_bits greater than ISOFS_BLOCK_BITS, we'll have a negative
shift and the bread will fail somewhat cryptically:

  isofs_fill_super: bread failed, dev=sda, iso_blknum=17, block=-2147483648

It seems best to just catch and clearly reject mounts of such a device.

Reported-by: Bryan Gurney &lt;bgurney@redhat.com&gt;
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>isofs: fix potential memory leak in mount option parsing</title>
<updated>2018-04-16T07:47:41Z</updated>
<author>
<name>Chengguang Xu</name>
</author>
<published>2018-04-14T12:16:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f34a5130a471f32f2fe7750769ab4057dc3eaa0'/>
<id>urn:sha1:4f34a5130a471f32f2fe7750769ab4057dc3eaa0</id>
<content type='text'>
When specifying string type mount option (e.g., iocharset)
several times in a mount, current option parsing may
cause memory leak. Hence, call kfree for previous one
in this case. Meanwhile, check memory allocation result
for it.

Signed-off-by: Chengguang Xu &lt;cgxu519@gmx.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>Rename superblock flags (MS_xyz -&gt; SB_xyz)</title>
<updated>2017-11-27T21:05:09Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-11-27T21:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e'/>
<id>urn:sha1:1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e</id>
<content type='text'>
This is a pure automated search-and-replace of the internal kernel
superblock flags.

The s_flags are now called SB_*, with the names and the values for the
moment mirroring the MS_* flags that they're equivalent to.

Note how the MS_xyz flags are the ones passed to the mount system call,
while the SB_xyz flags are what we then use in sb-&gt;s_flags.

The script to do this was:

    # places to look in; re security/*: it generally should *not* be
    # touched (that stuff parses mount(2) arguments directly), but
    # there are two places where we really deal with superblock flags.
    FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
            include/linux/fs.h include/uapi/linux/bfs_fs.h \
            security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
    # the list of MS_... constants
    SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
          DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
          POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
          I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
          ACTIVE NOUSER"

    SED_PROG=
    for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done

    # we want files that contain at least one of MS_...,
    # with fs/namespace.c and fs/pnode.c excluded.
    L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')

    for f in $L; do sed -i $f $SED_PROG; done

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>isofs: fix build regression</title>
<updated>2017-09-18T10:24:26Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-09-16T20:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ab0b271bf75073cb254b5ea0593aceae5a42bd3'/>
<id>urn:sha1:0ab0b271bf75073cb254b5ea0593aceae5a42bd3</id>
<content type='text'>
The new isofs_show_options() function fails to build when CONFIG_NLS
is disabled:

fs/isofs/inode.c: In function 'isofs_show_options':
fs/isofs/inode.c:518:44: error: 'CONFIG_NLS_DEFAULT' undeclared (first use in this function)
fs/isofs/inode.c:518:44: note: each undeclared identifier is reported only once for each function it appears in

This adds a check for CONFIG_JOLIET (which selects NLS), matching
the other uses of the iocharset handling in this file.

Fixes: 6fecb86a44f5 ("isofs: Implement show_options")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2017-09-15T01:54:01Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-09-15T01:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f0d12728e56c94d3289c6831243b6faeae8a19d'/>
<id>urn:sha1:0f0d12728e56c94d3289c6831243b6faeae8a19d</id>
<content type='text'>
Pull mount flag updates from Al Viro:
 "Another chunk of fmount preparations from dhowells; only trivial
  conflicts for that part. It separates MS_... bits (very grotty
  mount(2) ABI) from the struct super_block -&gt;s_flags (kernel-internal,
  only a small subset of MS_... stuff).

  This does *not* convert the filesystems to new constants; only the
  infrastructure is done here. The next step in that series is where the
  conflicts would be; that's the conversion of filesystems. It's purely
  mechanical and it's better done after the merge, so if you could run
  something like

	list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$')

	sed -i -e 's/\&lt;MS_RDONLY\&gt;/SB_RDONLY/g' \
	        -e 's/\&lt;MS_NOSUID\&gt;/SB_NOSUID/g' \
	        -e 's/\&lt;MS_NODEV\&gt;/SB_NODEV/g' \
	        -e 's/\&lt;MS_NOEXEC\&gt;/SB_NOEXEC/g' \
	        -e 's/\&lt;MS_SYNCHRONOUS\&gt;/SB_SYNCHRONOUS/g' \
	        -e 's/\&lt;MS_MANDLOCK\&gt;/SB_MANDLOCK/g' \
	        -e 's/\&lt;MS_DIRSYNC\&gt;/SB_DIRSYNC/g' \
	        -e 's/\&lt;MS_NOATIME\&gt;/SB_NOATIME/g' \
	        -e 's/\&lt;MS_NODIRATIME\&gt;/SB_NODIRATIME/g' \
	        -e 's/\&lt;MS_SILENT\&gt;/SB_SILENT/g' \
	        -e 's/\&lt;MS_POSIXACL\&gt;/SB_POSIXACL/g' \
	        -e 's/\&lt;MS_KERNMOUNT\&gt;/SB_KERNMOUNT/g' \
	        -e 's/\&lt;MS_I_VERSION\&gt;/SB_I_VERSION/g' \
	        -e 's/\&lt;MS_LAZYTIME\&gt;/SB_LAZYTIME/g' \
	        $list

  and commit it with something along the lines of 'convert filesystems
  away from use of MS_... constants' as commit message, it would save a
  quite a bit of headache next cycle"

* 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  VFS: Differentiate mount flags (MS_*) from internal superblock flags
  VFS: Convert sb-&gt;s_flags &amp; MS_RDONLY to sb_rdonly(sb)
  vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
</content>
</entry>
<entry>
<title>isofs: Delete an unnecessary variable initialisation in isofs_read_inode()</title>
<updated>2017-08-23T16:54:03Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2017-08-19T06:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=def12ec59dd74f5b6ff013b874b1e558b1c22f50'/>
<id>urn:sha1:def12ec59dd74f5b6ff013b874b1e558b1c22f50</id>
<content type='text'>
The local variable "bh" will be set to an appropriate pointer a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>isofs: Adjust four checks for null pointers</title>
<updated>2017-08-23T16:53:06Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2017-08-18T19:47:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e96e8a1dc12e3186e24c74e42e03b788d3132377'/>
<id>urn:sha1:e96e8a1dc12e3186e24c74e42e03b788d3132377</id>
<content type='text'>
The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !...

Thus fix the affected source code places.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
