<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/fs/udf/balloc.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/fs/udf/balloc.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/fs/udf/balloc.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2019-07-31T16:41:37Z</updated>
<entry>
<title>udf: prevent allocation beyond UDF partition</title>
<updated>2019-07-31T16:41:37Z</updated>
<author>
<name>Steve Magnani</name>
<email>steve.magnani@digidescorp.com</email>
</author>
<published>2019-07-28T19:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=56db1991690f076c2a7e3b2a226629cd10901690'/>
<id>urn:sha1:56db1991690f076c2a7e3b2a226629cd10901690</id>
<content type='text'>
The UDF bitmap allocation code assumes that a recorded
Unallocated Space Bitmap is compliant with ECMA-167 4/13,
which requires that pad bytes between the end of the bitmap
and the end of a logical block are all zero.

When a recorded bitmap does not comply with this requirement,
for example one padded with FF to the block boundary instead
of 00, the allocator may "allocate" blocks that are outside
the UDF partition extent. This can result in UDF volume descriptors
being overwritten by file data or by partition-level descriptors,
and in extreme cases, even in scribbling on a subsequent disk partition.

Add a check that the block selected by the allocator actually
resides within the UDF partition extent.

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;

Link: https://lore.kernel.org/r/1564341552-129750-1-git-send-email-steve@digidescorp.com
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Drop freed bitmap / table support</title>
<updated>2018-09-07T08:32:22Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2018-09-06T15:52:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=694538b5d753666c81938ca6628188e1c432d377'/>
<id>urn:sha1:694538b5d753666c81938ca6628188e1c432d377</id>
<content type='text'>
We don't support Free Space Table and Free Space Bitmap as specified by
UDF standard for writing as we don't support erasing blocks before
overwriting them. Just drop the handling of these structures as
partition descriptor checking code already makes sure such filesystems
can be mounted only read-only.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: remove unused variables group_start and nr_groups</title>
<updated>2018-09-03T09:04:49Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-08-29T10:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=849fe89ce6d7bb52d2903c79d2ff089d55e6ff8a'/>
<id>urn:sha1:849fe89ce6d7bb52d2903c79d2ff089d55e6ff8a</id>
<content type='text'>
Variables group_start and nr_groups are being assigned but are never used
hence they are redundant and can be removed.

Cleans up clang warning:
variable 'group_start' set but not used [-Wunused-but-set-variable]
variable 'nr_groups' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Drop unused arguments of udf_delete_aext()</title>
<updated>2018-06-20T09:05:49Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2018-06-13T16:04:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6c1e4d06a3808dc67dbce2d631f4c12574567dd5'/>
<id>urn:sha1:6c1e4d06a3808dc67dbce2d631f4c12574567dd5</id>
<content type='text'>
udf_delete_aext() uses its last two arguments only as local variables.
Drop them.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Fix signed/unsigned format specifiers</title>
<updated>2017-10-17T10:00:58Z</updated>
<author>
<name>Steve Magnani</name>
<email>steve.magnani@digidescorp.com</email>
</author>
<published>2017-10-12T13:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fcbf7637e6647e00de04d4b2e05ece2484bb3062'/>
<id>urn:sha1:fcbf7637e6647e00de04d4b2e05ece2484bb3062</id>
<content type='text'>
Fix problems noted in compilion with -Wformat=2 -Wformat-signedness.
In particular, a mismatch between the signedness of a value and the
signedness of its format specifier can result in unsigned values being
printed as negative numbers, e.g.:

  Partition (0 type 1511) starts at physical 460, block length -1779968542

...which occurs when mounting a large (&gt; 1 TiB) UDF partition.

Changes since V1:
* Fixed additional issues noted in udf_bitmap_free_blocks(),
  udf_get_fileident(), udf_show_options()

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Fix 64-bit sign extension issues affecting blocks &gt; 0x7FFFFFFF</title>
<updated>2017-10-17T09:56:45Z</updated>
<author>
<name>Steve Magnani</name>
<email>steve.magnani@digidescorp.com</email>
</author>
<published>2017-10-12T13:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b490bdd630cc43a5725e76c7c23f8a7e55551145'/>
<id>urn:sha1:b490bdd630cc43a5725e76c7c23f8a7e55551145</id>
<content type='text'>
Large (&gt; 1 TiB) UDF filesystems appear subject to several problems when
mounted on 64-bit systems:

* readdir() can fail on a directory containing File Identifiers residing
  above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO.

* FIBMAP on a file block located above 0x7FFFFFFF can return a negative
  value. The low 32 bits are correct, but applications that don't mask the
  high 32 bits of the result can perform incorrectly.

Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation
of UDF block addresses. Ultimately, all driver functions that manipulate
UDF block addresses should use this type; for now, deployment is limited
to functions with actual or potential sign extension issues.

Changes to udf_readdir() and udf_block_map() address the issues noted
above; other changes address potential similar issues uncovered during
audit of the driver code.

Signed-off-by: Steven J. Magnani &lt;steve@digidescorp.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Factor out code for creating indirect extent</title>
<updated>2015-12-23T17:04:52Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2015-12-23T13:21:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fcea62babc8100aee79c716c81203c6d105b2da0'/>
<id>urn:sha1:fcea62babc8100aee79c716c81203c6d105b2da0</id>
<content type='text'>
Factor out code for creating indirect extent from udf_add_aext(). It was
mostly duplicated in two places. Also remove some opencoded versions
of udf_write_aext().

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: use int for allocated blocks instead of sector_t</title>
<updated>2015-03-16T07:24:16Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-15T09:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1be440de2ac5181495a7295fa9a4c8ad0793f056'/>
<id>urn:sha1:1be440de2ac5181495a7295fa9a4c8ad0793f056</id>
<content type='text'>
Fix the following warnings:

fs/udf/balloc.c:768:15: warning: conversion to 'sector_t' from 'int'
may change the sign of the result [-Wsign-conversion]
   allocated = udf_bitmap_prealloc_blocks(sb,
               ^
fs/udf/balloc.c:773:15: warning: conversion to 'sector_t' from 'int'
may change the sign of the result [-Wsign-conversion]
   allocated = udf_table_prealloc_blocks(sb,
               ^
fs/udf/balloc.c:778:15: warning: conversion to 'sector_t' from 'int'
may change the sign of the result [-Wsign-conversion]
   allocated = udf_bitmap_prealloc_blocks(sb,
               ^
fs/udf/balloc.c:783:15: warning: conversion to 'sector_t' from 'int'
may change the sign of the result [-Wsign-conversion]
   allocated = udf_table_prealloc_blocks(sb,
               ^
fs/udf/balloc.c:791:26: warning: conversion to 'loff_t' from 'sector_t'
may change the sign of the result [-Wsign-conversion]
   inode_add_bytes(inode, allocated &lt;&lt; sb-&gt;s_blocksize_bits);
                          ^
fs/udf/balloc.c:792:2: warning: conversion to 'int' from 'sector_t'
may alter its value [-Wconversion]
  return allocated;

Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: remove redundant buffer_head.h includes</title>
<updated>2015-03-14T06:54:02Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-10T20:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=13f0c2b0f67d6f04b21cedce726284b67457bd2f'/>
<id>urn:sha1:13f0c2b0f67d6f04b21cedce726284b67457bd2f</id>
<content type='text'>
buffer_head.h was already included in udfdecl.h

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: remove else after return in __load_block_bitmap()</title>
<updated>2015-03-14T06:39:32Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-10T20:44:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6fbaad879ae7ba75196b55bab216b9b4d0a541b3'/>
<id>urn:sha1:6fbaad879ae7ba75196b55bab216b9b4d0a541b3</id>
<content type='text'>
else after return is not needed.

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