CVE-2022-49805: net: lan966x: Fix potential null-ptr-deref in lan966x_stats_init()
In the Linux kernel, the following vulnerability has been resolved:
net: lan966x: Fix potential null-ptr-deref in lan966xstatsinit()
lan966xstatsinit() calls createsinglethreadworkqueue() and not checked the ret value, which may return NULL. And a null-ptr-deref may happen:
lan966xstatsinit() createsinglethreadworkqueue() # failed, lan966x->statsqueue is NULL queuedelayedwork() queuedelayedworkon() queuedelayedwork() # warning here, but continue queuework() # access wq->flags, null-ptr-deref
Check the ret value and return -ENOMEM if it is NULL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.0.10-1 - Compensating control
In the Linux kernel net: lan966x implementation, check the return value of create_singlethread_workqueue() in lan966x_stats_init(); if it is NULL, return -ENOMEM before calling queue_delayed_work().
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49805?
CVE-2022-49805 has a high severity due to the potential for null pointer dereference in the Linux kernel.
How do I fix CVE-2022-49805?
To resolve CVE-2022-49805, upgrade your Linux kernel to version 5.17 or later, or install the latest stable release.
Which versions of the Linux kernel are affected by CVE-2022-49805?
CVE-2022-49805 affects Linux kernel versions from 5.17 up to 6.0.10, along with specific release candidates.
What components are impacted by CVE-2022-49805?
CVE-2022-49805 specifically impacts the net: lan966x component in the Linux kernel.
What is the nature of the vulnerability described in CVE-2022-49805?
CVE-2022-49805 is a vulnerability that can lead to a null pointer dereference when create_singlethread_workqueue() fails without proper error checking.