CVE-2022-50140
published 2025-06-18CVE-2022-50140: In the Linux kernel, the following vulnerability has been resolved: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed. As it is…
PriorityP416medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
EPSS
0.16%
5.6th percentile
In the Linux kernel, the following vulnerability has been resolved:
memstick/ms_block: Fix a memory leak
'erased_blocks_bitmap' is never freed. As it is allocated at the same time
as 'used_blocks_bitmap', it is likely that it should be freed also at the
same time.
Add the corresponding bitmap_free() in msb_data_clear().
Affected
21 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | linux | < linux 6.0.2-1 (bookworm) | linux 6.0.2-1 (bookworm) |
| linux | linux | — | — |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < efd675246aec045507b9425c67b548cc2d782d8f | efd675246aec045507b9425c67b548cc2d782d8f |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 37958980eb4cd71ae594ace093c11b6a91e165e8 | 37958980eb4cd71ae594ace093c11b6a91e165e8 |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 9d8b911fe3c3ed788c66edba7c90e32a4a7a5f53 | 9d8b911fe3c3ed788c66edba7c90e32a4a7a5f53 |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 9260a154b3b5e387dbceec7c0ac441470646bc6f | 9260a154b3b5e387dbceec7c0ac441470646bc6f |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 961d7d12080fe70847f944d656e36cd0dd0214ba | 961d7d12080fe70847f944d656e36cd0dd0214ba |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 16e07966638717416abf45393d6a80a5a1034429 | 16e07966638717416abf45393d6a80a5a1034429 |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 39be95d1ff7b44c1e969af72ba9da7332dfcc1da | 39be95d1ff7b44c1e969af72ba9da7332dfcc1da |
| linux | linux | >= 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 < 54eb7a55be6779c4d0c25eaf5056498a28595049 | 54eb7a55be6779c4d0c25eaf5056498a28595049 |
| linux | linux_kernel | >= 0 < 5.10.140-1 | 5.10.140-1 |
| linux | linux_kernel | >= 0 < 6.0.2-1 | 6.0.2-1 |
| linux | linux_kernel | >= 0 < 6.0.2-1 | 6.0.2-1 |
| linux | linux_kernel | >= 0 < 6.0.2-1 | 6.0.2-1 |
| linux | linux_kernel | >= 3.12 < 4.14.291 | 4.14.291 |
| linux | linux_kernel | >= 4.15 < 4.19.256 | 4.19.256 |
| linux | linux_kernel | >= 4.20 < 5.4.211 | 5.4.211 |
| linux | linux_kernel | >= 5.11 < 5.15.61 | 5.15.61 |
| linux | linux_kernel | >= 5.16 < 5.18.18 | 5.18.18 |
| linux | linux_kernel | >= 5.19 < 5.19.2 | 5.19.2 |
| linux | linux_kernel | >= 5.5 < 5.10.137 | 5.10.137 |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
osv5.5MEDIUM
vendor_debian5.5MEDIUM
vendor_redhat5.5MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
kernel: memstick/ms_block: Fix a memory leak
vendor_redhat·2025-06-18·CVSS 5.5
CVE-2022-50140 [MEDIUM] kernel: memstick/ms_block: Fix a memory leak
kernel: memstick/ms_block: Fix a memory leak
In the Linux kernel, the following vulnerability has been resolved:
memstick/ms_block: Fix a memory leak
'erased_blocks_bitmap' is never freed. As it is allocated at the same time
as 'used_blocks_bitmap', it is likely that it should be freed also at the
same time.
Add the corresponding bitmap_free() in msb_data_clear().
Package: kernel (Red Hat Enterprise Linux 10) - Not affected
Package: kernel (Red Hat Enterprise Linux 6) - Not affected
Package: kernel (Red Hat Enterprise Linux 7) - Not affected
Package: kernel-rt (Red Hat Enterprise Linux 7) - Not affected
Package: kernel (Red Hat Enterprise Linux 8) - Not affected
Package: kernel-rt (Red Hat Enterprise Linux 8) - Not affected
Package: kernel (Red Hat Enterprise Linux 9) - Not affecte
Debian
CVE-2022-50140: linux - In the Linux kernel, the following vulnerability has been resolved: memstick/ms...
vendor_debian·2022·CVSS 5.5
CVE-2022-50140 [MEDIUM] CVE-2022-50140: linux - In the Linux kernel, the following vulnerability has been resolved: memstick/ms...
In the Linux kernel, the following vulnerability has been resolved: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed. As it is allocated at the same time as 'used_blocks_bitmap', it is likely that it should be freed also at the same time. Add the corresponding bitmap_free() in msb_data_clear().
Scope: local
bookworm: resolved (fixed in 6.0.2-1)
bullseye: resolved (fixed in 5.10.140-1)
forky: resolved (fixed in 6.0.2-1)
sid: resolved (fixed in 6.0.2-1)
trixie: resolved (fixed in 6.0.2-1)
OSV
CVE-2022-50140: In the Linux kernel, the following vulnerability has been resolved: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed
osv·2025-06-18·CVSS 5.5
CVE-2022-50140 [MEDIUM] CVE-2022-50140: In the Linux kernel, the following vulnerability has been resolved: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed
In the Linux kernel, the following vulnerability has been resolved: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed. As it is allocated at the same time as 'used_blocks_bitmap', it is likely that it should be freed also at the same time. Add the corresponding bitmap_free() in msb_data_clear().
GHSA
GHSA-3pqf-hwqx-7c78: In the Linux kernel, the following vulnerability has been resolved:
memstick/ms_block: Fix a memory leak
'erased_blocks_bitmap' is never freed
ghsa_unreviewed·2025-06-18
CVE-2022-50140 [MEDIUM] CWE-401 GHSA-3pqf-hwqx-7c78: In the Linux kernel, the following vulnerability has been resolved:
memstick/ms_block: Fix a memory leak
'erased_blocks_bitmap' is never freed
In the Linux kernel, the following vulnerability has been resolved:
memstick/ms_block: Fix a memory leak
'erased_blocks_bitmap' is never freed. As it is allocated at the same time
as 'used_blocks_bitmap', it is likely that it should be freed also at the
same time.
Add the corresponding bitmap_free() in msb_data_clear().
No detection rules found.
No public exploits indexed.
https://git.kernel.org/stable/c/16e07966638717416abf45393d6a80a5a1034429https://git.kernel.org/stable/c/37958980eb4cd71ae594ace093c11b6a91e165e8https://git.kernel.org/stable/c/39be95d1ff7b44c1e969af72ba9da7332dfcc1dahttps://git.kernel.org/stable/c/54eb7a55be6779c4d0c25eaf5056498a28595049https://git.kernel.org/stable/c/9260a154b3b5e387dbceec7c0ac441470646bc6fhttps://git.kernel.org/stable/c/961d7d12080fe70847f944d656e36cd0dd0214bahttps://git.kernel.org/stable/c/9d8b911fe3c3ed788c66edba7c90e32a4a7a5f53https://git.kernel.org/stable/c/efd675246aec045507b9425c67b548cc2d782d8f
2025-06-18
Published