CVE-2024-35824

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-35824
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35824.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35824
Downstream
Related
Published
2024-05-17T13:27:25Z
Modified
2025-10-14T15:38:16.089496Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume
Details

In the Linux kernel, the following vulnerability has been resolved:

misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume

When not configured for wakeup lis3lv02di2csuspend() will call lis3lv02d_poweroff() even if the device has already been turned off by the runtime-suspend handler and if configured for wakeup and the device is runtime-suspended at this point then it is not turned back on to serve as a wakeup source.

Before commit b1b9f7a49440 ("misc: lis3lv02di2c: Add missing setting of the regctrl callback"), lis3lv02d_poweroff() failed to disable the regulators which as a side effect made calling poweroff() twice ok.

Now that poweroff() correctly disables the regulators, doing this twice triggers a WARN() in the regulator core:

unbalanced disables for regulator-dummy WARNING: CPU: 1 PID: 92 at drivers/regulator/core.c:2999 regulatordisable ...

Fix lis3lv02di2csuspend() to not call poweroff() a second time if already runtime-suspended and add a poweron() call when necessary to make wakeup work.

lis3lv02di2cresume() has similar issues, with an added weirness that it always powers on the device if it is runtime suspended, after which the first runtime-resume will call poweron() again, causing the enabled count for the regulator to increase by 1 every suspend/resume. These unbalanced regulator_enable() calls cause the regulator to never be turned off and trigger the following WARN() on driver unbind:

WARNING: CPU: 1 PID: 1724 at drivers/regulator/core.c:2396 regulatorput

Fix this by making lis3lv02di2cresume() mirror the new suspend().

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2c1164ad927e62f122b151493bb183bc11dab8f8
Fixed
4154e767354140db7804207117e7238fb337b0e7
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1229ce1c4acd36f5af97c996420defc43daca635
Fixed
997ca415384612c8df76d99d9a768e0b3f42b325
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
755182e1e8667272a082506a2a20b4cdd78ab4c2
Fixed
f6df761182fc953907b18aba5049fc2a044ecb45
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b1b9f7a494400c0c39f8cd83de3aaa6111c55087
Fixed
ac3e0384073b2408d6cb0d972fee9fcc3776053d

Affected versions

v6.*

v6.1.77
v6.1.78
v6.1.79
v6.1.80
v6.1.81
v6.1.82
v6.1.83
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.7
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.10
v6.7.11
v6.7.4
v6.7.5
v6.7.6
v6.7.7
v6.7.8
v6.7.9
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5

Database specific

{
    "vanir_signatures": [
        {
            "id": "CVE-2024-35824-1797c121",
            "signature_type": "Function",
            "digest": {
                "function_hash": "76127811009862793978345782947359812509",
                "length": 219.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f6df761182fc953907b18aba5049fc2a044ecb45",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_resume"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-1ad44426",
            "signature_type": "Function",
            "digest": {
                "function_hash": "226397448416197080419466972527680484858",
                "length": 197.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@997ca415384612c8df76d99d9a768e0b3f42b325",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_suspend"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-37baf3b5",
            "signature_type": "Line",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "248927944150326682888944016049611240390",
                    "103929315454814228630065538592374251867",
                    "262588412493479921578723570172605948972",
                    "111585565129694692928035972021303879164",
                    "4723289175997795884303279383428796808",
                    "154703937908324033911142286531472859049",
                    "323942173896093921059315674742295926151",
                    "219651056695365102352285561926279712264",
                    "162914783715459827843044626948317516381",
                    "238749339625570860672817395896858687481"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac3e0384073b2408d6cb0d972fee9fcc3776053d",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-6cef5520",
            "signature_type": "Function",
            "digest": {
                "function_hash": "76127811009862793978345782947359812509",
                "length": 219.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac3e0384073b2408d6cb0d972fee9fcc3776053d",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_resume"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-97a064c5",
            "signature_type": "Line",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "248927944150326682888944016049611240390",
                    "103929315454814228630065538592374251867",
                    "262588412493479921578723570172605948972",
                    "111585565129694692928035972021303879164",
                    "4723289175997795884303279383428796808",
                    "154703937908324033911142286531472859049",
                    "323942173896093921059315674742295926151",
                    "219651056695365102352285561926279712264",
                    "162914783715459827843044626948317516381",
                    "238749339625570860672817395896858687481"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4154e767354140db7804207117e7238fb337b0e7",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-a1478d2f",
            "signature_type": "Function",
            "digest": {
                "function_hash": "226397448416197080419466972527680484858",
                "length": 197.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac3e0384073b2408d6cb0d972fee9fcc3776053d",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_suspend"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-cc613568",
            "signature_type": "Line",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "248927944150326682888944016049611240390",
                    "103929315454814228630065538592374251867",
                    "262588412493479921578723570172605948972",
                    "111585565129694692928035972021303879164",
                    "4723289175997795884303279383428796808",
                    "154703937908324033911142286531472859049",
                    "323942173896093921059315674742295926151",
                    "219651056695365102352285561926279712264",
                    "162914783715459827843044626948317516381",
                    "238749339625570860672817395896858687481"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@997ca415384612c8df76d99d9a768e0b3f42b325",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-d0e94ca6",
            "signature_type": "Function",
            "digest": {
                "function_hash": "226397448416197080419466972527680484858",
                "length": 197.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f6df761182fc953907b18aba5049fc2a044ecb45",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_suspend"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-d62e320b",
            "signature_type": "Function",
            "digest": {
                "function_hash": "226397448416197080419466972527680484858",
                "length": 197.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4154e767354140db7804207117e7238fb337b0e7",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_suspend"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-e8df6b86",
            "signature_type": "Line",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "248927944150326682888944016049611240390",
                    "103929315454814228630065538592374251867",
                    "262588412493479921578723570172605948972",
                    "111585565129694692928035972021303879164",
                    "4723289175997795884303279383428796808",
                    "154703937908324033911142286531472859049",
                    "323942173896093921059315674742295926151",
                    "219651056695365102352285561926279712264",
                    "162914783715459827843044626948317516381",
                    "238749339625570860672817395896858687481"
                ]
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f6df761182fc953907b18aba5049fc2a044ecb45",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-f0ed9cb8",
            "signature_type": "Function",
            "digest": {
                "function_hash": "76127811009862793978345782947359812509",
                "length": 219.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@997ca415384612c8df76d99d9a768e0b3f42b325",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_resume"
            },
            "deprecated": false,
            "signature_version": "v1"
        },
        {
            "id": "CVE-2024-35824-f8a1caf2",
            "signature_type": "Function",
            "digest": {
                "function_hash": "76127811009862793978345782947359812509",
                "length": 219.0
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4154e767354140db7804207117e7238fb337b0e7",
            "target": {
                "file": "drivers/misc/lis3lv02d/lis3lv02d_i2c.c",
                "function": "lis3lv02d_i2c_resume"
            },
            "deprecated": false,
            "signature_version": "v1"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.1.77
Fixed
6.1.84
Type
ECOSYSTEM
Events
Introduced
6.6.16
Fixed
6.6.24
Type
ECOSYSTEM
Events
Introduced
6.7.4
Fixed
6.7.12