CVE-2024-56641

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-56641
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56641.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-56641
Downstream
Related
Published
2024-12-27T15:02:42Z
Modified
2025-10-17T18:58:05.068127Z
Summary
net/smc: initialize close_work early to avoid warning
Details

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

net/smc: initialize close_work early to avoid warning

We encountered a warning that close_work was canceled before initialization.

WARNING: CPU: 7 PID: 111103 at kernel/workqueue.c:3047 flushwork+0x19e/0x1b0 Workqueue: events smclgrterminatework [smc] RIP: 0010:flushwork+0x19e/0x1b0 Call Trace: ? _wakeupcommon+0x7a/0x190 ? workbusy+0x80/0x80 _cancelworktimer+0xe3/0x160 smcclosecancelwork+0x1a/0x70 [smc] smccloseactiveabort+0x207/0x360 [smc] _smclgrterminate.part.38+0xc8/0x180 [smc] processonework+0x19e/0x340 workerthread+0x30/0x370 ? processonework+0x340/0x340 kthread+0x117/0x130 ? _kthreadcancelwork+0x50/0x50 retfrom_fork+0x22/0x30

This is because when smcclosecancelwork is triggered, e.g. the RDMA driver is rmmod and the LGR is terminated, the conn->closework is flushed before initialization, resulting in WARN_ON(!work->func).

_smclgrterminate | smcconnect_{rdma|ism}

                            | smc_conn_create
            | \- smc_lgr_register_conn

for conn in lgr->connsall | - smcconnkill | - smccloseactiveabort | - smcclosecancelwork | - cancelworksync | - _flushwork | (closework) | | smccloseinit | - INITWORK(&closework)

So fix this by initializing close_work before establishing the connection.

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
46c28dbd4c23c3f7fa37f5ea48772af79c9cc40e
Fixed
f0c37002210aaede10dae849d1a78efc2243add2
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
46c28dbd4c23c3f7fa37f5ea48772af79c9cc40e
Fixed
6638e52dcfafaf1b9cbc34544f0c832db0069ea1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
46c28dbd4c23c3f7fa37f5ea48772af79c9cc40e
Fixed
0541db8ee32c09463a72d0987382b3a3336b0043

Affected versions

v4.*

v4.11
v4.11-rc6
v4.11-rc7
v4.11-rc8
v4.12
v4.12-rc1
v4.12-rc2
v4.12-rc3
v4.12-rc4
v4.12-rc5
v4.12-rc6
v4.12-rc7
v4.13
v4.13-rc1
v4.13-rc2
v4.13-rc3
v4.13-rc4
v4.13-rc5
v4.13-rc6
v4.13-rc7
v4.14
v4.14-rc1
v4.14-rc2
v4.14-rc3
v4.14-rc4
v4.14-rc5
v4.14-rc6
v4.14-rc7
v4.14-rc8
v4.15
v4.15-rc1
v4.15-rc2
v4.15-rc3
v4.15-rc4
v4.15-rc5
v4.15-rc6
v4.15-rc7
v4.15-rc8
v4.15-rc9
v4.16
v4.16-rc1
v4.16-rc2
v4.16-rc3
v4.16-rc4
v4.16-rc5
v4.16-rc6
v4.16-rc7
v4.17
v4.17-rc1
v4.17-rc2
v4.17-rc3
v4.17-rc4
v4.17-rc5
v4.17-rc6
v4.17-rc7
v4.18
v4.18-rc1
v4.18-rc2
v4.18-rc3
v4.18-rc4
v4.18-rc5
v4.18-rc6
v4.18-rc7
v4.18-rc8
v4.19
v4.19-rc1
v4.19-rc2
v4.19-rc3
v4.19-rc4
v4.19-rc5
v4.19-rc6
v4.19-rc7
v4.19-rc8
v4.20
v4.20-rc1
v4.20-rc2
v4.20-rc3
v4.20-rc4
v4.20-rc5
v4.20-rc6
v4.20-rc7

v5.*

v5.0
v5.0-rc1
v5.0-rc2
v5.0-rc3
v5.0-rc4
v5.0-rc5
v5.0-rc6
v5.0-rc7
v5.0-rc8
v5.1
v5.1-rc1
v5.1-rc2
v5.1-rc3
v5.1-rc4
v5.1-rc5
v5.1-rc6
v5.1-rc7
v5.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11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.34
v6.6.35
v6.6.36
v6.6.37
v6.6.38
v6.6.39
v6.6.4
v6.6.40
v6.6.41
v6.6.42
v6.6.43
v6.6.44
v6.6.45
v6.6.46
v6.6.47
v6.6.48
v6.6.49
v6.6.5
v6.6.50
v6.6.51
v6.6.52
v6.6.53
v6.6.54
v6.6.55
v6.6.56
v6.6.57
v6.6.58
v6.6.59
v6.6.6
v6.6.60
v6.6.61
v6.6.62
v6.6.63
v6.6.64
v6.6.65
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0541db8ee32c09463a72d0987382b3a3336b0043",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_ism",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "335519717285604064351629582030465477607",
            "length": 1793.0
        },
        "id": "CVE-2024-56641-0084a21b"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0c37002210aaede10dae849d1a78efc2243add2",
        "signature_version": "v1",
        "target": {
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "241387172558184983194058901748891679321",
                "65395271526357111507042453504078245252",
                "310775782288692338209442168373168441066",
                "314067013031543130000478072427300301498",
                "130043729822950931321536645359538558989",
                "217181133736862386901876084276696623582",
                "258912460619509938158146522205897021937",
                "22069759908426177256635511903453952091",
                "93987255817786646047401151614205890708",
                "287656008215432680868132934983263583279",
                "37475151688074003047599936421992292098",
                "62053380930000063996040963484076719196",
                "288556133215617924423123580541812603421",
                "247728231216085187839875175731900191716",
                "324840896273415171459719430671891500924",
                "221776148474143849383127715210795130010"
            ]
        },
        "id": "CVE-2024-56641-07921c48"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6638e52dcfafaf1b9cbc34544f0c832db0069ea1",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_rdma",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "27125914119553819622121304740673757837",
            "length": 3035.0
        },
        "id": "CVE-2024-56641-2f42b28f"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6638e52dcfafaf1b9cbc34544f0c832db0069ea1",
        "signature_version": "v1",
        "target": {
            "function": "smc_listen_work",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "277460891171739787812758547527883524116",
            "length": 2607.0
        },
        "id": "CVE-2024-56641-3bed04e6"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0541db8ee32c09463a72d0987382b3a3336b0043",
        "signature_version": "v1",
        "target": {
            "function": "smc_sk_init",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "308689239146567287406826866004350366235",
            "length": 853.0
        },
        "id": "CVE-2024-56641-3eeb116b"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6638e52dcfafaf1b9cbc34544f0c832db0069ea1",
        "signature_version": "v1",
        "target": {
            "function": "smc_sk_init",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "308689239146567287406826866004350366235",
            "length": 853.0
        },
        "id": "CVE-2024-56641-60cdf05a"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0541db8ee32c09463a72d0987382b3a3336b0043",
        "signature_version": "v1",
        "target": {
            "function": "smc_listen_work",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "277460891171739787812758547527883524116",
            "length": 2607.0
        },
        "id": "CVE-2024-56641-65782d21"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0c37002210aaede10dae849d1a78efc2243add2",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_rdma",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "27125914119553819622121304740673757837",
            "length": 3035.0
        },
        "id": "CVE-2024-56641-86b68d3c"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6638e52dcfafaf1b9cbc34544f0c832db0069ea1",
        "signature_version": "v1",
        "target": {
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "241387172558184983194058901748891679321",
                "65395271526357111507042453504078245252",
                "310775782288692338209442168373168441066",
                "314067013031543130000478072427300301498",
                "130043729822950931321536645359538558989",
                "217181133736862386901876084276696623582",
                "258912460619509938158146522205897021937",
                "22069759908426177256635511903453952091",
                "93987255817786646047401151614205890708",
                "287656008215432680868132934983263583279",
                "37475151688074003047599936421992292098",
                "62053380930000063996040963484076719196",
                "288556133215617924423123580541812603421",
                "247728231216085187839875175731900191716",
                "324840896273415171459719430671891500924",
                "221776148474143849383127715210795130010"
            ]
        },
        "id": "CVE-2024-56641-8f27badc"
    },
    {
        "signature_type": "Line",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0541db8ee32c09463a72d0987382b3a3336b0043",
        "signature_version": "v1",
        "target": {
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "241387172558184983194058901748891679321",
                "65395271526357111507042453504078245252",
                "310775782288692338209442168373168441066",
                "314067013031543130000478072427300301498",
                "130043729822950931321536645359538558989",
                "217181133736862386901876084276696623582",
                "258912460619509938158146522205897021937",
                "22069759908426177256635511903453952091",
                "93987255817786646047401151614205890708",
                "287656008215432680868132934983263583279",
                "37475151688074003047599936421992292098",
                "62053380930000063996040963484076719196",
                "288556133215617924423123580541812603421",
                "247728231216085187839875175731900191716",
                "324840896273415171459719430671891500924",
                "221776148474143849383127715210795130010"
            ]
        },
        "id": "CVE-2024-56641-90a0409a"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0c37002210aaede10dae849d1a78efc2243add2",
        "signature_version": "v1",
        "target": {
            "function": "smc_listen_work",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "339894859397414005814977181831532059529",
            "length": 2597.0
        },
        "id": "CVE-2024-56641-974a1be0"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0541db8ee32c09463a72d0987382b3a3336b0043",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_rdma",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "27125914119553819622121304740673757837",
            "length": 3035.0
        },
        "id": "CVE-2024-56641-a4ee83b9"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6638e52dcfafaf1b9cbc34544f0c832db0069ea1",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_ism",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "335519717285604064351629582030465477607",
            "length": 1793.0
        },
        "id": "CVE-2024-56641-dd48d370"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0c37002210aaede10dae849d1a78efc2243add2",
        "signature_version": "v1",
        "target": {
            "function": "smc_sk_init",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "308689239146567287406826866004350366235",
            "length": 853.0
        },
        "id": "CVE-2024-56641-f6244da1"
    },
    {
        "signature_type": "Function",
        "deprecated": false,
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f0c37002210aaede10dae849d1a78efc2243add2",
        "signature_version": "v1",
        "target": {
            "function": "smc_connect_ism",
            "file": "net/smc/af_smc.c"
        },
        "digest": {
            "function_hash": "335519717285604064351629582030465477607",
            "length": 1793.0
        },
        "id": "CVE-2024-56641-fb1d5413"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.12.0
Fixed
6.6.66
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.5