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 _queue_work() # access wq->flags, null-ptr-deref
Check the ret value and return -ENOMEM if it is NULL.
{ "vanir_signatures": [ { "digest": { "length": 642.0, "function_hash": "53355092333940554467092622200458389667" }, "target": { "file": "drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c", "function": "lan966x_stats_init" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba86af3733aece88dbcee0dfebf7e2dcfefb2be4", "signature_version": "v1", "id": "CVE-2022-49805-0a61eb44", "signature_type": "Function" }, { "digest": { "threshold": 0.9, "line_hashes": [ "186348251930749788508193481077585204213", "311560325550135878829324095486591635017", "279363652682126468871652357503909687564", "291408542250250159548854052963313033541" ] }, "target": { "file": "drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba86af3733aece88dbcee0dfebf7e2dcfefb2be4", "signature_version": "v1", "id": "CVE-2022-49805-4cd0a748", "signature_type": "Line" }, { "digest": { "length": 642.0, "function_hash": "53355092333940554467092622200458389667" }, "target": { "file": "drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c", "function": "lan966x_stats_init" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4a43c1c6040e848e1344c7b16ac696b68fbc439c", "signature_version": "v1", "id": "CVE-2022-49805-ee1b1f5b", "signature_type": "Function" }, { "digest": { "threshold": 0.9, "line_hashes": [ "186348251930749788508193481077585204213", "311560325550135878829324095486591635017", "279363652682126468871652357503909687564", "291408542250250159548854052963313033541" ] }, "target": { "file": "drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4a43c1c6040e848e1344c7b16ac696b68fbc439c", "signature_version": "v1", "id": "CVE-2022-49805-f0af3482", "signature_type": "Line" } ] }