Bug 2363514 (CVE-2022-49806) - CVE-2022-49806 kernel: net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start()
Summary: CVE-2022-49806 kernel: net: microchip: sparx5: Fix potential null-ptr-deref i...
Keywords:
Status: NEW
Alias: CVE-2022-49806
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 15:07 UTC by OSIDB Bzimport
Modified: 2025-05-02 06:07 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-01 15:07:45 UTC
In the Linux kernel, the following vulnerability has been resolved:

net: microchip: sparx5: Fix potential null-ptr-deref in sparx_stats_init() and sparx5_start()

sparx_stats_init() calls create_singlethread_workqueue() and not
checked the ret value, which may return NULL. And a null-ptr-deref may
happen:

sparx_stats_init()
    create_singlethread_workqueue() # failed, sparx5->stats_queue is NULL
    queue_delayed_work()
        queue_delayed_work_on()
            __queue_delayed_work()  # warning here, but continue
                __queue_work()      # access wq->flags, null-ptr-deref

Check the ret value and return -ENOMEM if it is NULL. So as
sparx5_start().

Comment 1 Avinash Hanwate 2025-05-02 05:56:40 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050128-CVE-2022-49806-c461@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.