In the Linux kernel, the following vulnerability has been resolved:
jffs2: fix memory leak in jffs2domount_fs
If jffs2buildfilesystem() in jffs2domount_fs() returns an error, we can observe the following kmemleak report:
unreferenced object 0xffff88811b25a640 (size 64): comm "mount", pid 691, jiffies 4294957728 (age 71.952s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffffa493be24>] kmemcachealloctrace+0x584/0x880 [<ffffffffa5423a06>] jffs2suminit+0x86/0x130 [<ffffffffa5400e58>] jffs2domountfs+0x798/0xac0 [<ffffffffa540acf3>] jffs2dofillsuper+0x383/0xc30 [<ffffffffa540c00a>] jffs2fillsuper+0x2ea/0x4c0 [...] unreferenced object 0xffff88812c760000 (size 65536): comm "mount", pid 691, jiffies 4294957728 (age 71.952s) hex dump (first 32 bytes): bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ backtrace: [<ffffffffa493a449>] _kmalloc+0x6b9/0x910 [<ffffffffa5423a57>] jffs2suminit+0xd7/0x130 [<ffffffffa5400e58>] jffs2domountfs+0x798/0xac0 [<ffffffffa540acf3>] jffs2dofillsuper+0x383/0xc30 [<ffffffffa540c00a>] jffs2fillsuper+0x2ea/0x4c0
This is because the resources allocated in jffs2suminit() are not released. Call jffs2sumexit() to release these resources to solve the problem.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49277.json"
}[
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-089e5fcc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d051cef784de4d54835f6b6836d98a8f6935772c"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-2424028a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4392e8aeebc5a4f8073620bccba7de1b1f6d7c88"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-2bc92896",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9a0f6610c7daedd2eace430beeb08a8b7ac80699"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-2d901b2d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a9d8184458562e6bf2f40d0e677fc85e2dd3834"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-32b453f4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d051cef784de4d54835f6b6836d98a8f6935772c"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-41422c2e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9a0f6610c7daedd2eace430beeb08a8b7ac80699"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-51a3761b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0978e9af4559a171ac7a74a1b3ef21804b0a0fa9"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-569e15ea",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c94128470e6fe53d9bd9d16d2d3271813f9d37af"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-668c7175",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c94128470e6fe53d9bd9d16d2d3271813f9d37af"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-87d73436",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@607d3aab7349f18e0d9dba4100d09d16fe27caca"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-8c60b73e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a9d8184458562e6bf2f40d0e677fc85e2dd3834"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-aeaa68a4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@607d3aab7349f18e0d9dba4100d09d16fe27caca"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-b57e36ba",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0978e9af4559a171ac7a74a1b3ef21804b0a0fa9"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-bf00bb39",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f34310d1376ca5b2ed798258def2c2ab3cc6699"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"260246438263204699470043459309801610834",
"271922563602053455741855687309895757311",
"46877078844200426763263302792700941136",
"315644883333104033735322206734389633952",
"150732636497795853661102763811135594901",
"264544314680237917309327102022095518418",
"279204483684170347479937374686333794439"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "fs/jffs2/build.c"
},
"signature_type": "Line",
"id": "CVE-2022-49277-f125218b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4392e8aeebc5a4f8073620bccba7de1b1f6d7c88"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "125871672537722791257797286498077711243",
"length": 1468.0
},
"deprecated": false,
"target": {
"function": "jffs2_do_mount_fs",
"file": "fs/jffs2/build.c"
},
"signature_type": "Function",
"id": "CVE-2022-49277-fbd46b80",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5f34310d1376ca5b2ed798258def2c2ab3cc6699"
}
]