In the Linux kernel, the following vulnerability has been resolved:
blk-mq: fix possible memleak when register 'hctx' failed
There's issue as follows when do fault injection test: unreferenced object 0xffff888132a9f400 (size 512): comm "insmod", pid 308021, jiffies 4324277909 (age 509.733s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 08 f4 a9 32 81 88 ff ff ...........2.... 08 f4 a9 32 81 88 ff ff 00 00 00 00 00 00 00 00 ...2............ backtrace: [<00000000e8952bb4>] kmallocnodetrace+0x22/0xa0 [<00000000f9980e0f>] blkmqallocandinithctx+0x3f1/0x7e0 [<000000002e719efa>] blkmqreallochwctxs+0x1e6/0x230 [<000000004f1fda40>] blkmqinitallocatedqueue+0x27e/0x910 [<00000000287123ec>] _blkmqallocdisk+0x67/0xf0 [<00000000a2a34657>] 0xffffffffa2ad310f [<00000000b173f718>] 0xffffffffa2af824a [<0000000095a1dabb>] dooneinitcall+0x87/0x2a0 [<00000000f32fdf93>] doinitmodule+0xdf/0x320 [<00000000cbe8541e>] loadmodule+0x3006/0x3390 [<0000000069ed1bdb>] _dosysfinitmodule+0x113/0x1b0 [<00000000a1a29ae8>] dosyscall64+0x35/0x80 [<000000009cd878b0>] entrySYSCALL64afterhwframe+0x46/0xb0
Fault injection context as follows: kobjectadd blkmqregisterhctx blkmqsysfsregister blkregisterqueue deviceadddisk nulladddev.part.0 [nullblk]
As 'blkmqregisterhctx' may already add some objects when failed halfway, but there isn't do fallback, caller don't know which objects add failed. To solve above issue just do fallback when add objects failed halfway in 'blkmqregisterhctx'.
[
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-1c7dc687",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b7fafa5f39b15c3a6ca3b95e534d05d6904cc95",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"126808424384663776812804638956306595257"
]
},
"deprecated": false,
"id": "CVE-2022-50434-34749616",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87fd18016a47ea8ae12641377a390172c4aa97a7",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"268235879368215763403983860116251771676"
]
},
"deprecated": false,
"id": "CVE-2022-50434-40943b8a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b7a21c57b14fbcd0e1729150189e5933f5088e9",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"23038660657617143530409269853144388188",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"126808424384663776812804638956306595257"
]
},
"deprecated": false,
"id": "CVE-2022-50434-6fae84d8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02bc8bc6eab03c84373281b85cb6e98747172ff7",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-73c3a80c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eff45bfbc25a2509a6362dea6e699e14083c693c",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-84892585",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87fd18016a47ea8ae12641377a390172c4aa97a7",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-952d2877",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@33e8a3f61814ea30615d0fafaf50477975d6c1ca",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"23038660657617143530409269853144388188",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"33033900880950650991516184375395022077"
]
},
"deprecated": false,
"id": "CVE-2022-50434-993b32f0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@654870789c3c1b9763316ef1c71d7a449127b175",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-a86c013c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b7a21c57b14fbcd0e1729150189e5933f5088e9",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"126808424384663776812804638956306595257"
]
},
"deprecated": false,
"id": "CVE-2022-50434-aa1d94a3",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eff45bfbc25a2509a6362dea6e699e14083c693c",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "269054374172485019409284120759247828807",
"length": 400.0
},
"deprecated": false,
"id": "CVE-2022-50434-ae4e520b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8022da1fa2fdf2fa204b445dd3354e7a66d085a",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"268235879368215763403983860116251771676"
]
},
"deprecated": false,
"id": "CVE-2022-50434-c124331e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b7fafa5f39b15c3a6ca3b95e534d05d6904cc95",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"126808424384663776812804638956306595257"
]
},
"deprecated": false,
"id": "CVE-2022-50434-cfdce3f7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8022da1fa2fdf2fa204b445dd3354e7a66d085a",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"23038660657617143530409269853144388188",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"33033900880950650991516184375395022077"
]
},
"deprecated": false,
"id": "CVE-2022-50434-d2c4bce9",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb186eb47fb9dd327bdefa15f0c5fc55c53a40dd",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "259336589343849479004223405409911385235",
"length": 402.0
},
"deprecated": false,
"id": "CVE-2022-50434-d934e912",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb186eb47fb9dd327bdefa15f0c5fc55c53a40dd",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "259336589343849479004223405409911385235",
"length": 402.0
},
"deprecated": false,
"id": "CVE-2022-50434-d968f197",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02bc8bc6eab03c84373281b85cb6e98747172ff7",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67420270095110406630966155654874238072",
"113470254175919490525345340403851173076",
"131744166542052824377658953913073725897",
"92391298444661360504652623889170932767",
"327628551208521371691472712519988093661",
"245690549470286049145751299600079464219",
"224744840092983448557542159827843453746",
"296599009438651474580404452929488205716",
"268235879368215763403983860116251771676"
]
},
"deprecated": false,
"id": "CVE-2022-50434-e95e9836",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@33e8a3f61814ea30615d0fafaf50477975d6c1ca",
"target": {
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "259336589343849479004223405409911385235",
"length": 402.0
},
"deprecated": false,
"id": "CVE-2022-50434-f3065df7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@654870789c3c1b9763316ef1c71d7a449127b175",
"target": {
"function": "blk_mq_register_hctx",
"file": "block/blk-mq-sysfs.c"
},
"signature_type": "Function"
}
]