]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ceph: avoid putting the realm twice when decoding snaps fails
authorXiubo Li <xiubli@redhat.com>
Wed, 9 Nov 2022 03:00:39 +0000 (11:00 +0800)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 12:59:33 +0000 (13:59 +0100)
commit0df9adb3e89309c5406131f784a428c730022d42
tree0947f66cfa4dc4149437fb84cbcd3226450b4701
parente53a50ef758446d82d3012d0021d433f56573469
ceph: avoid putting the realm twice when decoding snaps fails

[ Upstream commit 51884d153f7ec85e18d607b2467820a90e0f4359 ]

When decoding the snaps fails it maybe leaving the 'first_realm'
and 'realm' pointing to the same snaprealm memory. And then it'll
put it twice and could cause random use-after-free, BUG_ON, etc
issues.

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/57686
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2f6e2de3a5289004650118b61f138fe7c28e1905)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fs/ceph/snap.c