Commit 7026a103 authored by Dongliang Mu's avatar Dongliang Mu Committed by Long Li
Browse files

JFS: fix memleak in jfs_mount

stable inclusion
from stable-v4.19.217
commit a30503f74353ca48c02963437679537a96271bdc
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I96G7N
CVE: CVE-2023-52600

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=tags/v4.19.218&id=a30503f74353ca48c02963437679537a96271bdc



--------------------------------

[ Upstream commit c48a14dc ]

In jfs_mount, when diMount(ipaimap2) fails, it goes to errout35. However,
the following code does not free ipaimap2 allocated by diReadSpecial.

Fix this by refactoring the error handling code of jfs_mount. To be
specific, modify the lable name and free ipaimap2 when the above error
ocurrs.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLong Li <leo.lilong@huawei.com>
parent 7875dd00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment