diff options
| author | Bryam Vargas <hexlabsecurity@proton.me> | 2026-07-17 06:27:00 -0500 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-07-17 21:40:53 +0200 |
| commit | 97fc4b53dbe4a983fdf093243067fa6a64562307 (patch) | |
| tree | e79f46a9848910fe3842e2b3fcd0820969b59710 /drivers/md/dm-pcache/cache_writeback.c | |
| parent | 16c3b3a326e70f246a605b3dc27b7f83ba4743e3 (diff) | |
| download | linux-next-97fc4b53dbe4a983fdf093243067fa6a64562307.tar.gz linux-next-97fc4b53dbe4a983fdf093243067fa6a64562307.zip | |
dm-pcache: bound the logical key offset from persistent memory
cache_key_decode() takes a key's logical off from the cache device and
later indexes req_key_tree->subtrees[] by it in get_subtree(). An off
past the device forms a subtree pointer outside the array, which
rb_insert() writes through during replay.
Reject a key of zero length, or whose off+len (computed in 64 bits)
exceeds the device size, before it is used.
Fixes: 1d57628ff95b ("dm-pcache: add persistent cache target in device-mapper")
Cc: stable@vger.kernel.org
Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'drivers/md/dm-pcache/cache_writeback.c')
0 files changed, 0 insertions, 0 deletions
