In the Linux kernel, the following vulnerability has been resolved:
regulator: core: fix use_count leakage when handling boot-on
I found a use_count leakage towards supply regulator of rdev with boot-on option.
┌───────────────────┐ ┌───────────────────┐ │ regulatordev A │ │ regulatordev B │ │ (boot-on) │ │ (boot-on) │ │ usecount=0 │◀──supply──│ usecount=1 │ │ │ │ │ └───────────────────┘ └───────────────────┘
In case of rdev(A) configured with `regulator-boot-on', the usecount of supplying regulator(B) will increment inside regulatorenable(rdev->supply).
Thus, B will acts like always-on, and further balanced regulator_enable/disable cannot actually disable it anymore.
However, B was also configured with `regulator-boot-on', we wish it could be disabled afterwards.
[ { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bfc53df288e8ea54ca6866fb92034214940183f", "id": "CVE-2022-50250-19bd8fab", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc3391d49479bc2bf8a2b88dbf86fdd800882fee", "id": "CVE-2022-50250-24054b93", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "235446206385119424199425532374000631371", "length": 2863.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bfc53df288e8ea54ca6866fb92034214940183f", "id": "CVE-2022-50250-289a8b69", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "226639751716645560810469521992306514298", "length": 2790.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dc3391d49479bc2bf8a2b88dbf86fdd800882fee", "id": "CVE-2022-50250-28d23277", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "209037658216560165452371889078014091662", "length": 5015.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0591b14ce0398125439c759f889647369aa616a0", "id": "CVE-2022-50250-32abee3a", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0591b14ce0398125439c759f889647369aa616a0", "id": "CVE-2022-50250-3422808e", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "198689573627896216255773839324639599937", "length": 4740.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@feb847e6591e8c7a09cc39721cc9ca74fd9a5d80", "id": "CVE-2022-50250-3d47ee0f", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "133171558935773335985372438942237276327", "length": 3029.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b737246ff50f810d6ab4be13c1388a07f0c14b1", "id": "CVE-2022-50250-58a2b5f8", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4b737246ff50f810d6ab4be13c1388a07f0c14b1", "id": "CVE-2022-50250-5b203ad2", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@feb847e6591e8c7a09cc39721cc9ca74fd9a5d80", "id": "CVE-2022-50250-76fb81c3", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc6c381df5793ebcf32db88a3e65acf7870379fc", "id": "CVE-2022-50250-864112f8", "signature_version": "v1" }, { "signature_type": "Line", "target": { "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "141005900696052563641750227441565441112", "283924371520735722574986060374262719128", "257589086575930158818605991967977682966", "55155861175084846182497584668298129819" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4dd6e1cc9c7403f1ee1b7eee85bc31b797ae8347", "id": "CVE-2022-50250-8e92a0c1", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "209037658216560165452371889078014091662", "length": 5015.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4dd6e1cc9c7403f1ee1b7eee85bc31b797ae8347", "id": "CVE-2022-50250-a64738e5", "signature_version": "v1" }, { "signature_type": "Function", "target": { "function": "set_machine_constraints", "file": "drivers/regulator/core.c" }, "deprecated": false, "digest": { "function_hash": "209037658216560165452371889078014091662", "length": 5015.0 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc6c381df5793ebcf32db88a3e65acf7870379fc", "id": "CVE-2022-50250-d2a1678c", "signature_version": "v1" } ]