<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2026-04-13T07:07:48+00:00</updated>
<entry>
<title>Release mtd-utils-2.3.1</title>
<updated>2026-04-13T07:07:48+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2026-04-13T07:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=053ee1038e5dedae61a88cadfb7bdfe9894d8bb6'/>
<id>urn:sha1:053ee1038e5dedae61a88cadfb7bdfe9894d8bb6</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Update CHANGELOG.md</title>
<updated>2026-04-13T07:04:38+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2025-11-28T20:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a51d2bc50bbfcb93b91eb2d2d60f6402f732c9d2'/>
<id>urn:sha1:a51d2bc50bbfcb93b91eb2d2d60f6402f732c9d2</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: tests: jittertest: reject overlong file names</title>
<updated>2026-04-13T06:42:56+00:00</updated>
<author>
<name>Aviv Daum</name>
<email>aviv.daum@gmail.com</email>
</author>
<published>2026-03-18T22:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=514063a6d7a628e358894b6a6a6cb089c264fc09'/>
<id>urn:sha1:514063a6d7a628e358894b6a6a6cb089c264fc09</id>
<content type='text'>
plotJittervsFill copies the -f argument into a 250-byte buffer with
strncpy(..., sizeof(LogFile)). A 250-byte file name leaves the buffer
unterminated, and the subsequent fopen() reads past the end of LogFile.

JitterTest uses the same fixed-size file name pattern for -r, while -c
still silently truncates overlong names and -f already rejects them.

Validate jittertest file name arguments before copying them so these
options all reject overlong input instead of truncating it or reading
past the end of fixed-size buffers.

Add a shell regression test that exercises the accepted and rejected
boundary lengths for plotJittervsFill and JitterTest during make check.

Signed-off-by: Aviv Daum &lt;aviv.daum@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>misc-utils: docfdisk.c: validate partition size to prevent arithmetic overflow</title>
<updated>2026-04-13T06:42:56+00:00</updated>
<author>
<name>Anton Moryakov</name>
<email>ant.v.moryakov@gmail.com</email>
</author>
<published>2025-10-28T10:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=5f7dd327a813c83f97f4a6128bb82c021ed870d8'/>
<id>urn:sha1:5f7dd327a813c83f97f4a6128bb82c021ed870d8</id>
<content type='text'>
report of the static analyzer:
Possible integer overflow: right operand is tainted.
An integer overflow may occur due to arithmetic operation (addition)
between variable 'block' and value { [1, 4294967295] } of 'nblocks[i]',
when 'block' is equal to '1'

correct explained:
Added bounds check before incrementing block counter to ensure that
adding nblocks[i] does not exceed totblocks. This prevents potential
integer overflow when user-specified partition sizes are too large,
which could lead to incorrect partition table layout and device corruption.
The validation ensures safe arithmetic by checking block + nblocks[i] &lt;= totblocks
using unsigned comparison.

Signed-off-by: Anton Moryakov &lt;ant.v.moryakov@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>misc-utils: docfdisk.c: fix potential integer underflow in partition size calculation</title>
<updated>2026-04-13T06:42:56+00:00</updated>
<author>
<name>Anton Moryakov</name>
<email>ant.v.moryakov@gmail.com</email>
</author>
<published>2025-10-27T22:50:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3528028a687820eebe2a94013d6ec3a052b4c20e'/>
<id>urn:sha1:3528028a687820eebe2a94013d6ec3a052b4c20e</id>
<content type='text'>
report of the static analyzer:
Possible integer underflow: right operand is tainted.
An integer underflow may occur due to arithmetic
operation (unsigned subtraction) between
variables 'totblocks' and 'block', where 'totblocks'
is in range { [0, 4294967295] }, and 'block' is tainted { [0, 4294967295] }

correct explained:
Added validation check before calculating remaining
space for partition. The issue occurred when setting
the last partition size to 0, which triggers calculation
'totblocks - block'. Without validation, if block &gt;= totblocks,
this would result in integer underflow due to unsigned
arithmetic, potentially creating a partition with enormous
size and leading to device corruption.

Signed-off-by: Anton Moryakov &lt;ant.v.moryakov@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: fix platform dependant ino_t and loff_t formatting</title>
<updated>2026-04-13T05:32:41+00:00</updated>
<author>
<name>Yuta Hayama</name>
<email>hayama@lineo.co.jp</email>
</author>
<published>2026-02-13T13:55:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a505a2cc56acf493607fdf24cbf129393a0873fa'/>
<id>urn:sha1:a505a2cc56acf493607fdf24cbf129393a0873fa</id>
<content type='text'>
On architectures such as armv7-a, ino_t and loff_t are unsigned long long rather than
unsigned long. In such cases, the printf format specifier "%lu" is not
appropriate and causes an incorrect address offset.

  mtd-utils/ubifs-utils/fsck.ubifs/problem.c:224
  		log_out(c, "problem: %s, ino %lu, unreachable dentry %s, type %s%s",
  			problem-&gt;desc, ifp-&gt;file-&gt;inum,
  			c-&gt;encrypted &amp;&amp; !ifp-&gt;file-&gt;ino.is_xattr ? "&lt;encrypted&gt;" : dent_node-&gt;name,
  			ubifs_get_type_name(dent_node-&gt;type),
  			key_type(c, &amp;dent_node-&gt;key) == UBIFS_XENT_KEY ? "(xattr)" : "");

  fsck.ubifs[484] (/dev/ubi0_0,danger mode): problem: Dentry is unreachable, ino 917, unreachable dentry (null), type checksum_typefile

Furthermore, running fsck.ubifs with the --debug=4 option will almost
certainly cause a SEGV at the following point.

  mtd-utils/ubifs-utils/fsck.ubifs/check_files.c:103
  	dbg_fsck("construct file(%lu) for %s node, TNC location %d:%d, in %s",
  		 inum, ubifs_get_key_name(key_type(c, key)), sn-&gt;lnum, sn-&gt;offs,
  		 c-&gt;dev_name);

To ensure functionality regardless of environment, cast ino_t to unsigned
long, since it will never be more than 4 bytes.

For loff_t, use %lld and cast accordingly.

Signed-off-by: Yuta Hayama &lt;hayama@lineo.co.jp&gt;
Signed-off-by: Tomas Alvarez Vanoli &lt;tomas.alvarez-vanoli@hitachienergy.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>fsck.ubifs: don't use pointers that reference out-of-scope variables</title>
<updated>2026-04-13T05:32:41+00:00</updated>
<author>
<name>Yuta Hayama</name>
<email>hayama@lineo.co.jp</email>
</author>
<published>2025-11-13T08:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a75782ee97eb5940c865fd560d846b9a93ed9122'/>
<id>urn:sha1:a75782ee97eb5940c865fd560d846b9a93ed9122</id>
<content type='text'>
sn is a reference to either an ino_node, dent_node, or data_node. When sn
is actually used in calls to dbg_fsck() or insert_or_update_file(), these
variables must not be out of scope.

Signed-off-by: Yuta Hayama &lt;hayama@lineo.co.jp&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubiattach: fix wording in usage example</title>
<updated>2026-04-13T05:32:41+00:00</updated>
<author>
<name>Mohammad Rahimi</name>
<email>rahimi.mhmmd@gmail.com</email>
</author>
<published>2026-02-12T01:35:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=eccab61f367d24f3fc79652cc89463999b418a8e'/>
<id>urn:sha1:eccab61f367d24f3fc79652cc89463999b418a8e</id>
<content type='text'>
The usage example 4 describing reserved eraseblocks had awkward and
slightly incorrect phrasing ("is total flash chip eraseblocks count").
Reword it for clarity and readability without changing the meaning.

Signed-off-by: Mohammad Rahimi &lt;rahimi.mhmmd@gmail.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: serve_image: fix _POSIX_C_SOURCE</title>
<updated>2025-11-28T20:12:42+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2025-10-26T20:00:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=af2c69a52065236b907f6e478d3645a4fb7f8a9d'/>
<id>urn:sha1:af2c69a52065236b907f6e478d3645a4fb7f8a9d</id>
<content type='text'>
200809 is needed for pread/pwrite

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-tests: flash_speed: fix error message in read_eraseblock()</title>
<updated>2025-11-28T19:13:57+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>j4g8y7@gmail.com</email>
</author>
<published>2025-07-23T11:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=0f532c9990d4d920e390135c04adb03bf6074e46'/>
<id>urn:sha1:0f532c9990d4d920e390135c04adb03bf6074e46</id>
<content type='text'>
Replace 'write' with 'read' in the error message of the read_eraseblock()
function to indicate the correct direction of the operation.

Signed-off-by: Gabor Juhos &lt;j4g8y7@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
