<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/udf/super.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-11-09T11:53:58Z</updated>
<entry>
<title>udf: Fix crash after seekdir</title>
<updated>2021-11-09T11:53:58Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2021-11-04T14:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a48fc69fe6588b48d878d69de223b91a386a7cb4'/>
<id>urn:sha1:a48fc69fe6588b48d878d69de223b91a386a7cb4</id>
<content type='text'>
udf_readdir() didn't validate the directory position it should start
reading from. Thus when user uses lseek(2) on directory file descriptor
it can trick udf_readdir() into reading from a position in the middle of
directory entry which then upsets directory parsing code resulting in
errors or even possible kernel crashes. Similarly when the directory is
modified between two readdir calls, the directory position need not be
valid anymore.

Add code to validate current offset in the directory. This is actually
rather expensive for UDF as we need to read from the beginning of the
directory and parse all directory entries. This is because in UDF a
directory is just a stream of data containing directory entries and
since file names are fully under user's control we cannot depend on
detecting magic numbers and checksums in the header of directory entry
as a malicious attacker could fake them. We skip this step if we detect
that nothing changed since the last readdir call.

Reported-by: Nathan Wilson &lt;nate@chickenbrittle.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: use sb_bdev_nr_blocks</title>
<updated>2021-10-18T20:43:23Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2021-10-18T10:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4ae4735f7c2da77db57ee090b9f513bfe80d285'/>
<id>urn:sha1:e4ae4735f7c2da77db57ee090b9f513bfe80d285</id>
<content type='text'>
Use the sb_bdev_nr_blocks helper instead of open coding it.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/r/20211018101130.1838532-31-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>udf: Fix iocharset=utf8 mount option</title>
<updated>2021-08-12T14:07:09Z</updated>
<author>
<name>Pali Rohár</name>
</author>
<published>2021-08-08T16:24:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b645333443712d2613e4e863f81090d5dc509657'/>
<id>urn:sha1:b645333443712d2613e4e863f81090d5dc509657</id>
<content type='text'>
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_map is set to NULL. So simplify
code around, remove UDF_FLAG_NLS_MAP and UDF_FLAG_UTF8 flags as to
distinguish between UTF-8 and non-UTF-8 it is needed just to check if
s_nls_map set to NULL or not.

Link: https://lore.kernel.org/r/20210808162453.1653-4-pali@kernel.org
Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Check LVID earlier</title>
<updated>2021-08-11T14:54:44Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2021-05-03T09:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=781d2a9a2fc7d0be53a072794dc03ef6de770f3d'/>
<id>urn:sha1:781d2a9a2fc7d0be53a072794dc03ef6de770f3d</id>
<content type='text'>
We were checking validity of LVID entries only when getting
implementation use information from LVID in udf_sb_lvidiu(). However if
the LVID is suitably corrupted, it can cause problems also to code such
as udf_count_free() which doesn't use udf_sb_lvidiu(). So check validity
of LVID already when loading it from the disk and just disable LVID
altogether when it is not valid.

Reported-by: syzbot+7fbfe5fed73ebb675748@syzkaller.appspotmail.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge tag 'fs_for_v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs</title>
<updated>2021-02-22T21:25:37Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-02-22T21:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fe190462668d4dc6db56e819322624cbfda919b'/>
<id>urn:sha1:9fe190462668d4dc6db56e819322624cbfda919b</id>
<content type='text'>
Pull isofs, udf, and quota updates from Jan Kara:
 "Several udf, isofs, and quota fixes"

* tag 'fs_for_v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  parser: Fix kernel-doc markups
  udf: handle large user and group ID
  isofs: handle large user and group ID
  parser: add unsigned int parser
  udf: fix silent AED tagLocation corruption
  isofs: release buffer head before return
  quota: Fix memory leak when handling corrupted quota file
</content>
</entry>
<entry>
<title>udf: handle large user and group ID</title>
<updated>2021-02-03T18:05:54Z</updated>
<author>
<name>BingJing Chang</name>
</author>
<published>2021-01-29T04:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a9a3aa805af842f7a20adbf7f1006caddb87d31'/>
<id>urn:sha1:3a9a3aa805af842f7a20adbf7f1006caddb87d31</id>
<content type='text'>
If uid or gid of mount options is larger than INT_MAX, udf_fill_super will
return -EINVAL.

The problem can be encountered by a domain user or reproduced via:
mount -o loop,uid=2147483648 something-in-udf-format.iso /mnt

This can be fixed as commit 233a01fa9c4c ("fuse: handle large user and
group ID").

Link: https://lore.kernel.org/r/20210129045502.10546-1-bingjingc@synology.com
Reviewed-by: Robbie Ko &lt;robbieko@synology.com&gt;
Reviewed-by: Chung-Chiang Cheng &lt;cccheng@synology.com&gt;
Signed-off-by: BingJing Chang &lt;bingjingc@synology.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: fix the problem that the disc content is not displayed</title>
<updated>2021-01-18T11:06:33Z</updated>
<author>
<name>lianzhi chang</name>
</author>
<published>2021-01-14T07:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5cdc4a6950a883594e9640b1decb3fcf6222a594'/>
<id>urn:sha1:5cdc4a6950a883594e9640b1decb3fcf6222a594</id>
<content type='text'>
When the capacity of the disc is too large (assuming the 4.7G
specification), the disc (UDF file system) will be burned
multiple times in the windows (Multisession Usage). When the
remaining capacity of the CD is less than 300M (estimated
value, for reference only), open the CD in the Linux system,
the content of the CD is displayed as blank (the kernel will
say "No VRS found"). Windows can display the contents of the
CD normally.
Through analysis, in the "fs/udf/super.c": udf_check_vsd
function, the actual value of VSD_MAX_SECTOR_OFFSET may
be much larger than 0x800000. According to the current code
logic, it is found that the type of sbi-&gt;s_session is "__s32",
 when the remaining capacity of the disc is less than 300M
(take a set of test values: sector=3154903040,
sbi-&gt;s_session=1540464, sb-&gt;s_blocksize_bits=11 ), the
calculation result of "sbi-&gt;s_session &lt;&lt; sb-&gt;s_blocksize_bits"
 will overflow. Therefore, it is necessary to convert the
type of s_session to "loff_t" (when udf_check_vsd starts,
assign a value to _sector, which is also converted in this
way), so that the result will not overflow, and then the
content of the disc can be displayed normally.

Link: https://lore.kernel.org/r/20210114075741.30448-1-changlianzhi@uniontech.com
Signed-off-by: lianzhi chang &lt;changlianzhi@uniontech.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2020-10-24T19:26:05Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2020-10-24T19:26:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0eac1102e94807023e57d032bbba51830928b78e'/>
<id>urn:sha1:0eac1102e94807023e57d032bbba51830928b78e</id>
<content type='text'>
Pull misc vfs updates from Al Viro:
 "Assorted stuff all over the place (the largest group here is
  Christoph's stat cleanups)"

* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: remove KSTAT_QUERY_FLAGS
  fs: remove vfs_stat_set_lookup_flags
  fs: move vfs_fstatat out of line
  fs: implement vfs_stat and vfs_lstat in terms of vfs_fstatat
  fs: remove vfs_statx_fd
  fs: omfs: use kmemdup() rather than kmalloc+memcpy
  [PATCH] reduce boilerplate in fsid handling
  fs: Remove duplicated flag O_NDELAY occurring twice in VALID_OPEN_FLAGS
  selftests: mount: add nosymfollow tests
  Add a "nosymfollow" mount option.
</content>
</entry>
<entry>
<title>udf: Limit sparing table size</title>
<updated>2020-09-29T15:21:54Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2020-09-25T12:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44ac6b829c4e173fdf6df18e6dd86aecf9a3dc99'/>
<id>urn:sha1:44ac6b829c4e173fdf6df18e6dd86aecf9a3dc99</id>
<content type='text'>
Although UDF standard allows it, we don't support sparing table larger
than a single block. Check it during mount so that we don't try to
access memory beyond end of buffer.

Reported-by: syzbot+9991561e714f597095da@syzkaller.appspotmail.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Remove pointless union in udf_inode_info</title>
<updated>2020-09-29T15:21:54Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2020-09-25T10:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=382a2287bf9cd283206764572f66ab12657218aa'/>
<id>urn:sha1:382a2287bf9cd283206764572f66ab12657218aa</id>
<content type='text'>
We use only a single member out of the i_ext union in udf_inode_info.
Just remove the pointless union.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
