{"id":"DEBIAN-CVE-2022-49276","details":"In the Linux kernel, the following vulnerability has been resolved:  jffs2: fix memory leak in jffs2_scan_medium  If an error is returned in jffs2_scan_eraseblock() and some memory has been added to the jffs2_summary *s, we can observe the following kmemleak report:  -------------------------------------------- unreferenced object 0xffff88812b889c40 (size 64):   comm \"mount\", pid 692, jiffies 4294838325 (age 34.288s)   hex dump (first 32 bytes):     40 48 b5 14 81 88 ff ff 01 e0 31 00 00 00 50 00  @H........1...P.     00 00 01 00 00 00 01 00 00 00 02 00 00 00 09 08  ................   backtrace:     [\u003cffffffffae93a3a3\u003e] __kmalloc+0x613/0x910     [\u003cffffffffaf423b9c\u003e] jffs2_sum_add_dirent_mem+0x5c/0xa0     [\u003cffffffffb0f3afa8\u003e] jffs2_scan_medium.cold+0x36e5/0x4794     [\u003cffffffffb0f3dbe1\u003e] jffs2_do_mount_fs.cold+0xa7/0x2267     [\u003cffffffffaf40acf3\u003e] jffs2_do_fill_super+0x383/0xc30     [\u003cffffffffaf40c00a\u003e] jffs2_fill_super+0x2ea/0x4c0     [\u003cffffffffb0315d64\u003e] mtd_get_sb+0x254/0x400     [\u003cffffffffb0315f5f\u003e] mtd_get_sb_by_nr+0x4f/0xd0     [\u003cffffffffb0316478\u003e] get_tree_mtd+0x498/0x840     [\u003cffffffffaf40bd15\u003e] jffs2_get_tree+0x25/0x30     [\u003cffffffffae9f358d\u003e] vfs_get_tree+0x8d/0x2e0     [\u003cffffffffaea7a98f\u003e] path_mount+0x50f/0x1e50     [\u003cffffffffaea7c3d7\u003e] do_mount+0x107/0x130     [\u003cffffffffaea7c5c5\u003e] __se_sys_mount+0x1c5/0x2f0     [\u003cffffffffaea7c917\u003e] __x64_sys_mount+0xc7/0x160     [\u003cffffffffb10142f5\u003e] do_syscall_64+0x45/0x70 unreferenced object 0xffff888114b54840 (size 32):   comm \"mount\", pid 692, jiffies 4294838325 (age 34.288s)   hex dump (first 32 bytes):     c0 75 b5 14 81 88 ff ff 02 e0 02 00 00 00 02 00  .u..............     00 00 84 00 00 00 44 00 00 00 6b 6b 6b 6b 6b a5  ......D...kkkkk.   backtrace:     [\u003cffffffffae93be24\u003e] kmem_cache_alloc_trace+0x584/0x880     [\u003cffffffffaf423b04\u003e] jffs2_sum_add_inode_mem+0x54/0x90     [\u003cffffffffb0f3bd44\u003e] jffs2_scan_medium.cold+0x4481/0x4794     [...] unreferenced object 0xffff888114b57280 (size 32):   comm \"mount\", pid 692, jiffies 4294838393 (age 34.357s)   hex dump (first 32 bytes):     10 d5 6c 11 81 88 ff ff 08 e0 05 00 00 00 01 00  ..l.............     00 00 38 02 00 00 28 00 00 00 6b 6b 6b 6b 6b a5  ..8...(...kkkkk.   backtrace:     [\u003cffffffffae93be24\u003e] kmem_cache_alloc_trace+0x584/0x880     [\u003cffffffffaf423c34\u003e] jffs2_sum_add_xattr_mem+0x54/0x90     [\u003cffffffffb0f3a24f\u003e] jffs2_scan_medium.cold+0x298c/0x4794     [...] unreferenced object 0xffff8881116cd510 (size 16):   comm \"mount\", pid 692, jiffies 4294838395 (age 34.355s)   hex dump (first 16 bytes):     00 00 00 00 00 00 00 00 09 e0 60 02 00 00 6b a5  ..........`...k.   backtrace:     [\u003cffffffffae93be24\u003e] kmem_cache_alloc_trace+0x584/0x880     [\u003cffffffffaf423cc4\u003e] jffs2_sum_add_xref_mem+0x54/0x90     [\u003cffffffffb0f3b2e3\u003e] jffs2_scan_medium.cold+0x3a20/0x4794     [...] --------------------------------------------  Therefore, we should call jffs2_sum_reset_collected(s) on exit to release the memory added in s. In addition, a new tag \"out_buf\" is added to prevent the NULL pointer reference caused by s being NULL. (thanks to Zhang Yi for this analysis)","modified":"2026-09-01T20:03:34.533716452Z","published":"2025-02-26T07:01:04.470Z","upstream":["CVE-2022-49276"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2022-49276"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.17.3-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49276.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.17.3-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49276.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.17.3-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-49276.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}