<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/ceph/osdmap.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-05T12:28:26+00:00</updated>
<entry>
<title>libceph: make free_choose_arg_map() resilient to partial allocation</title>
<updated>2026-01-05T12:28:26+00:00</updated>
<author>
<name>Tuo Li</name>
<email>islituo@gmail.com</email>
</author>
<published>2025-12-20T18:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3fe30e57649c551757a02e1cad073c47e1e075e'/>
<id>urn:sha1:e3fe30e57649c551757a02e1cad073c47e1e075e</id>
<content type='text'>
free_choose_arg_map() may dereference a NULL pointer if its caller fails
after a partial allocation.

For example, in decode_choose_args(), if allocation of arg_map-&gt;args
fails, execution jumps to the fail label and free_choose_arg_map() is
called. Since arg_map-&gt;size is updated to a non-zero value before memory
allocation, free_choose_arg_map() will iterate over arg_map-&gt;args and
dereference a NULL pointer.

To prevent this potential NULL pointer dereference and make
free_choose_arg_map() more resilient, add checks for pointers before
iterating.

Cc: stable@vger.kernel.org
Co-authored-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Tuo Li &lt;islituo@gmail.com&gt;
Reviewed-by: Viacheslav Dubeyko &lt;Slava.Dubeyko@ibm.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: replace overzealous BUG_ON in osdmap_apply_incremental()</title>
<updated>2026-01-05T12:28:26+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2025-12-15T10:53:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e00c3f71b5cf75681dbd74ee3f982a99cb690c2b'/>
<id>urn:sha1:e00c3f71b5cf75681dbd74ee3f982a99cb690c2b</id>
<content type='text'>
If the osdmap is (maliciously) corrupted such that the incremental
osdmap epoch is different from what is expected, there is no need to
BUG.  Instead, just declare the incremental osdmap to be invalid.

Cc: stable@vger.kernel.org
Reported-by: ziming zhang &lt;ezrakiez@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: make decode_pool() more resilient against corrupted osdmaps</title>
<updated>2025-12-10T10:50:54+00:00</updated>
<author>
<name>Ilya Dryomov</name>
<email>idryomov@gmail.com</email>
</author>
<published>2025-12-02T09:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c738512714e8c0aa18f8a10c072d5b01c83db39'/>
<id>urn:sha1:8c738512714e8c0aa18f8a10c072d5b01c83db39</id>
<content type='text'>
If the osdmap is (maliciously) corrupted such that the encoded length
of ceph_pg_pool envelope is less than what is expected for a particular
encoding version, out-of-bounds reads may ensue because the only bounds
check that is there is based on that length value.

This patch adds explicit bounds checks for each field that is decoded
or skipped.

Cc: stable@vger.kernel.org
Reported-by: ziming zhang &lt;ezrakiez@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Reviewed-by: Xiubo Li &lt;xiubli@redhat.com&gt;
Tested-by: ziming zhang &lt;ezrakiez@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: Amend checking to fix `make W=1` build breakage</title>
<updated>2025-12-10T10:50:54+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2025-11-10T14:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04d8712b079327409b09dee628378f9583e2e035'/>
<id>urn:sha1:04d8712b079327409b09dee628378f9583e2e035</id>
<content type='text'>
In a few cases the code compares 32-bit value to a SIZE_MAX derived
constant which is much higher than that value on 64-bit platforms,
Clang, in particular, is not happy about this

net/ceph/osdmap.c:1441:10: error: result of comparison of constant 4611686018427387891 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 1441 |         if (len &gt; (SIZE_MAX - sizeof(*pg)) / sizeof(u32))
      |             ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ceph/osdmap.c:1624:10: error: result of comparison of constant 2305843009213693945 with expression of type 'u32' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
 1624 |         if (len &gt; (SIZE_MAX - sizeof(*pg)) / (2 * sizeof(u32)))
      |             ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by casting to size_t. Note, that possible replacement of SIZE_MAX
by U32_MAX may lead to the behaviour changes on the corner cases.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Viacheslav Dubeyko &lt;Slava.Dubeyko@ibm.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: replace BUG_ON with bounds check for map-&gt;max_osd</title>
<updated>2025-11-27T08:59:42+00:00</updated>
<author>
<name>ziming zhang</name>
<email>ezrakiez@gmail.com</email>
</author>
<published>2025-11-17T10:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec3797f043756a94ea2d0f106022e14ac4946c02'/>
<id>urn:sha1:ec3797f043756a94ea2d0f106022e14ac4946c02</id>
<content type='text'>
OSD indexes come from untrusted network packets. Boundary checks are
added to validate these against map-&gt;max_osd.

[ idryomov: drop BUG_ON in ceph_get_primary_affinity(), minor cosmetic
  edits ]

Cc: stable@vger.kernel.org
Signed-off-by: ziming zhang &lt;ezrakiez@gmail.com&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: print fsid and epoch with osd id</title>
<updated>2022-08-02T22:54:12+00:00</updated>
<author>
<name>Daichi Mukai</name>
<email>daichi-mukai@cybozu.co.jp</email>
</author>
<published>2022-06-14T11:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=842d6b019b180f5b78d71aa445ee3c724e34d462'/>
<id>urn:sha1:842d6b019b180f5b78d71aa445ee3c724e34d462</id>
<content type='text'>
Print fsid and epoch in libceph log messages to distinct from which
each message come.

[ idryomov: don't bother with gid for now, print epoch instead ]

Signed-off-by: Satoru Takeuchi &lt;satoru.takeuchi@gmail.com&gt;
Signed-off-by: Daichi Mukai &lt;daichi-mukai@cybozu.co.jp&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>libceph: check pointer before assigned to "c-&gt;rules[]"</title>
<updated>2022-08-02T22:54:12+00:00</updated>
<author>
<name>Li Qiong</name>
<email>liqiong@nfschina.com</email>
</author>
<published>2022-06-14T07:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc54cb8d876ae7b2d1bd0cf8a4d0b96a76318a91'/>
<id>urn:sha1:fc54cb8d876ae7b2d1bd0cf8a4d0b96a76318a91</id>
<content type='text'>
It should be better to check pointer firstly, then assign it
to c-&gt;rules[]. Refine code a little bit.

Signed-off-by: Li Qiong &lt;liqiong@nfschina.com&gt;
Reviewed-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
</entry>
<entry>
<title>mm: allow !GFP_KERNEL allocations for kvmalloc</title>
<updated>2022-01-15T14:30:29+00:00</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.com</email>
</author>
<published>2022-01-14T22:07:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a421ef303008b0ceee2cfc625c3246fa7654b0ca'/>
<id>urn:sha1:a421ef303008b0ceee2cfc625c3246fa7654b0ca</id>
<content type='text'>
Support for GFP_NO{FS,IO} and __GFP_NOFAIL has been implemented by
previous patches so we can allow the support for kvmalloc.  This will
allow some external users to simplify or completely remove their
helpers.

GFP_NOWAIT semantic hasn't been supported so far but it hasn't been
explicitly documented so let's add a note about that.

ceph_kvmalloc is the first helper to be dropped and changed to kvmalloc.

Link: https://lkml.kernel.org/r/20211122153233.9924-5-mhocko@kernel.org
Signed-off-by: Michal Hocko &lt;mhocko@suse.com&gt;
Reviewed-by: Uladzislau Rezki (Sony) &lt;urezki@gmail.com&gt;
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Ilya Dryomov &lt;idryomov@gmail.com&gt;
Cc: Jeff Layton &lt;jlayton@kernel.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>libceph: Fix spelling mistakes</title>
<updated>2021-06-03T20:24:23+00:00</updated>
<author>
<name>Zheng Yongjun</name>
<email>zhengyongjun3@huawei.com</email>
</author>
<published>2021-06-02T06:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd0d91b9139899ba2546290ab282767600e0f358'/>
<id>urn:sha1:dd0d91b9139899ba2546290ab282767600e0f358</id>
<content type='text'>
Fix some spelling mistakes in comments:
enconding  ==&gt; encoding
ambigous  ==&gt; ambiguous
orignal  ==&gt; original
encyption  ==&gt; encryption

Signed-off-by: Zheng Yongjun &lt;zhengyongjun3@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ceph: Fix a typo in osdmap.c</title>
<updated>2021-03-26T00:05:07+00:00</updated>
<author>
<name>Lu Wei</name>
<email>luwei32@huawei.com</email>
</author>
<published>2021-03-25T06:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f9143f10c3d5055093b18fd3eaa8fc6d1b460f5'/>
<id>urn:sha1:3f9143f10c3d5055093b18fd3eaa8fc6d1b460f5</id>
<content type='text'>
Modify "inital" to "initial" in net/ceph/osdmap.c.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Lu Wei &lt;luwei32@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
