In the Linux kernel, the following vulnerability has been resolved:
blk-iolatency: Fix memory leak on add_disk() failures
When a gendisk is successfully initialized but adddisk() fails such as when a loop device has invalid number of minor device numbers specified, blkcginitdisk() is called during init and then blkcgexit_disk() during error handling. Unfortunately, iolatency gets initialized in the former but doesn't get cleaned up in the latter.
This is because, in non-error cases, the cleanup is performed by delgendisk() calling rqqosexit(), the assumption being that rqqos policies, iolatency being one of them, can only be activated once the disk is fully registered and visible. That assumption is true for wbt and iocost, but not so for iolatency as it gets initialized before add_disk() is called.
It is desirable to lazy-init rqqos policies because they are optional features and add to hot path overhead once initialized - each IO has to walk all the registered rqqos policies. So, we want to switch iolatency to lazy init too. However, that's a bigger change. As a fix for the immediate problem, let's just add an extra call to rqqosexit() in blkcgexitdisk(). This is safe because duplicate calls to rqqosexit() become noop's.
{ "vanir_signatures": [ { "id": "CVE-2022-50550-215ec8cf", "signature_type": "Line", "target": { "file": "block/blk-cgroup.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "287242413962561740541375932647658911918", "215185046582169069565055158692927859331", "180390800287411301732876904579394027407", "13144674150001802767436355310464817936", "11513550311751943130479857091725612270", "46637171219193372538459622416841544733", "98661408116224644257080746114978771597", "211157605266148477459511160927502595642" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@813e693023ba10da9e75067780f8378465bf27cc" }, { "id": "CVE-2022-50550-40918e95", "signature_type": "Line", "target": { "file": "block/blk-cgroup.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "287242413962561740541375932647658911918", "215185046582169069565055158692927859331", "180390800287411301732876904579394027407", "13144674150001802767436355310464817936", "11513550311751943130479857091725612270", "46637171219193372538459622416841544733", "98661408116224644257080746114978771597", "211157605266148477459511160927502595642" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a126e1db5553ce4498290df019866952f858954" }, { "id": "CVE-2022-50550-bc1c2cac", "signature_type": "Function", "target": { "file": "block/blk-cgroup.c", "function": "blkcg_exit_disk" }, "signature_version": "v1", "digest": { "length": 78.0, "function_hash": "56771322495587552517050006786434802306" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@215f9437dda09531bcb80605298a24219f01cec5" }, { "id": "CVE-2022-50550-d0696afc", "signature_type": "Function", "target": { "file": "block/blk-cgroup.c", "function": "blkcg_exit_disk" }, "signature_version": "v1", "digest": { "length": 78.0, "function_hash": "56771322495587552517050006786434802306" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@813e693023ba10da9e75067780f8378465bf27cc" }, { "id": "CVE-2022-50550-f246c587", "signature_type": "Line", "target": { "file": "block/blk-cgroup.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "287242413962561740541375932647658911918", "215185046582169069565055158692927859331", "180390800287411301732876904579394027407", "13144674150001802767436355310464817936", "11513550311751943130479857091725612270", "46637171219193372538459622416841544733", "98661408116224644257080746114978771597", "211157605266148477459511160927502595642" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@215f9437dda09531bcb80605298a24219f01cec5" }, { "id": "CVE-2022-50550-fe5fd3af", "signature_type": "Function", "target": { "file": "block/blk-cgroup.c", "function": "blkcg_exit_disk" }, "signature_version": "v1", "digest": { "length": 78.0, "function_hash": "56771322495587552517050006786434802306" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2a126e1db5553ce4498290df019866952f858954" } ] }