CVE-2022-50555

Source
https://cve.org/CVERecord?id=CVE-2022-50555
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50555.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50555
Downstream
Published
2025-10-07T15:21:16.179Z
Modified
2026-03-20T11:47:31.465702Z
Summary
tipc: fix a null-ptr-deref in tipc_topsrv_accept
Details

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

tipc: fix a null-ptr-deref in tipctopsrvaccept

syzbot found a crash in tipctopsrvaccept:

KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] Workqueue: tipcrcv tipctopsrvaccept RIP: 0010:kernelaccept+0x22d/0x350 net/socket.c:3487 Call Trace: <TASK> tipctopsrvaccept+0x197/0x280 net/tipc/topsrv.c:460 processonework+0x991/0x1610 kernel/workqueue.c:2289 workerthread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 retfromfork+0x1f/0x30 arch/x86/entry/entry64.S:306

It was caused by srv->listener that might be set to null by tipctopsrvstop() in net .exit whereas it's still used in tipctopsrvaccept() worker.

srv->listener is protected by srv->idrlock in tipctopsrvstop(), so add a check for srv->listener under srv->idrlock in tipctopsrvaccept() to avoid the null-ptr-deref. To ensure the lsock is not released during the tipctopsrvaccept(), move sockrelease() after tipctopsrvworkstop() where it's waiting until the tipctopsrvaccept worker to be done.

Note that skcallbacklock is used to protect sk->skuserdata instead of srv->listener, and it should check srv in tipctopsrvlistenerdataready() instead. This also ensures that no more tipctopsrvaccept worker will be started after tipcconnclose() is called in tipctopsrvstop() where it sets sk->skuserdata to null.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50555.json",
    "cna_assigner": "Linux"
}
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
0ef897be12b8b4cf297b6016e79ec97ec90f2cf6
Fixed
ce69bdac2310152bb70845024d5d704c52aabfc3
Fixed
24b129aed8730e48f47d852d58d76825ab6f407c
Fixed
32a3d4660b34ce49ac0162338ebe362098e2f5df
Fixed
7a939503fc32bff4ed60800b73ff7fbb4aea2142
Fixed
cedb41664e27b2cae7e21487f1bee22dcd84037d
Fixed
82cb4e4612c633a9ce320e1773114875604a3cce

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50555.json"