In the Linux kernel, the following vulnerability has been resolved:
mtd: Fix device name leak when register device failed in addmtddevice()
There is a kmemleak when register device failed: unreferenced object 0xffff888101aab550 (size 8): comm "insmod", pid 3922, jiffies 4295277753 (age 925.408s) hex dump (first 8 bytes): 6d 74 64 30 00 88 ff ff mtd0.... backtrace: [<00000000bde26724>] _kmallocnodetrackcaller+0x4e/0x150 [<000000003c32b416>] kvasprintf+0xb0/0x130 [<000000001f7a8f15>] kobjectsetnamevargs+0x2f/0xb0 [<000000006e781163>] devsetname+0xab/0xe0 [<00000000e30d0c78>] addmtddevice+0x4bb/0x700 [<00000000f3d34de7>] mtddeviceparseregister+0x2ac/0x3f0 [<00000000c0d88488>] 0xffffffffa0238457 [<00000000b40d0922>] 0xffffffffa02a008f [<0000000023d17b9d>] dooneinitcall+0x87/0x2a0 [<00000000770f6ca6>] doinitmodule+0xdf/0x320 [<000000007b6768fe>] loadmodule+0x2f98/0x3330 [<00000000346bed5a>] _dosysfinitmodule+0x113/0x1b0 [<00000000674c2290>] dosyscall64+0x35/0x80 [<000000004c6a8d97>] entrySYSCALL64after_hwframe+0x46/0xb0
If register device failed, should call put_device() to give up the reference.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@895d68a39481a75c680aa421546931fb11942fa6",
"digest": {
"line_hashes": [
"302440339437320783578690948822812559213",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-17a75d68",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2302e2dc42b1f84f951c725ce742fc21c5a1e151",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"156447400326425902819526115039528562941",
"314466489391821957195959214218568112781",
"105032667939406047238166162379097419544"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-19ed4d6e",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcabe1dc2a344adbb3382930a23e273ba9382277",
"digest": {
"function_hash": "195181193805202856713843871841577313204",
"length": 2885.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-21cfbc0a",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa0d32ab8407d7481450c664fd0de64f2dae9489",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-2875f5eb",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71212d73184845c944ef1b43f092e643e5bde003",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-3922d9b9",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1b172fb05d6315ecec082fd7544a3390e96f0d7e",
"digest": {
"function_hash": "195181193805202856713843871841577313204",
"length": 2885.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-3a5b4c14",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2302e2dc42b1f84f951c725ce742fc21c5a1e151",
"digest": {
"function_hash": "184925939197287709159213340989691461437",
"length": 2164.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-5c10b52c",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a75f45afa932bfb24a2603ebcea5efd2e7cdcfd6",
"digest": {
"function_hash": "270221264487661562200162705758090105027",
"length": 1953.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-5f8bb4cb",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71212d73184845c944ef1b43f092e643e5bde003",
"digest": {
"function_hash": "18309748247521592739641423463438213603",
"length": 2678.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-675ee80c",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa0d32ab8407d7481450c664fd0de64f2dae9489",
"digest": {
"function_hash": "259829347402187694930719413337840551919",
"length": 2283.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-834b750d",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1b172fb05d6315ecec082fd7544a3390e96f0d7e",
"digest": {
"line_hashes": [
"302440339437320783578690948822812559213",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-98ac8357",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@db07fe76df01f40cb897d6e9066b84e46957beb3",
"digest": {
"function_hash": "208717727666153826542935545728134791435",
"length": 2287.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-ab4599ba",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@330bc5533e8a8ed69cb951d5a8edce9bddb9db21",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-bcb07933",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a75f45afa932bfb24a2603ebcea5efd2e7cdcfd6",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"140251440405520315398877947654972951729",
"87378745058110786367152278104408282084",
"301107832822541865237194583600681377500"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-c311462d",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@db07fe76df01f40cb897d6e9066b84e46957beb3",
"digest": {
"line_hashes": [
"18709919352106485451872440251604634962",
"225798117841653527971468076520395441873",
"156447400326425902819526115039528562941",
"314466489391821957195959214218568112781",
"105032667939406047238166162379097419544"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-caf78c70",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@330bc5533e8a8ed69cb951d5a8edce9bddb9db21",
"digest": {
"function_hash": "18309748247521592739641423463438213603",
"length": 2678.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-ced8d952",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@895d68a39481a75c680aa421546931fb11942fa6",
"digest": {
"function_hash": "195181193805202856713843871841577313204",
"length": 2885.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2022-50566-ed342fd8",
"target": {
"function": "add_mtd_device",
"file": "drivers/mtd/mtdcore.c"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bcabe1dc2a344adbb3382930a23e273ba9382277",
"digest": {
"line_hashes": [
"302440339437320783578690948822812559213",
"225798117841653527971468076520395441873",
"332085494580746369585134241428367157741",
"53023087575596745547548558125358690713",
"233222460699208287338135328077054708495"
],
"threshold": 0.9
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2022-50566-f434dabe",
"target": {
"file": "drivers/mtd/mtdcore.c"
}
}
]