high CVSS 7.8

CVE-2022-49535·Kernel vulnerability

In the Linux kernel, the following vulnerability has been resolved: scsi: lpfc: Fix null pointer dereference after failing to issue FLOGI and PLOGI If lpfc_issue_els_flogi() fails and returns non-zero status, the node reference count is decremented to trigger the release of the nodelist structure. However, if there is a prior registration or dev-loss-evt work pending, the node may be released prematurely. When dev-loss-evt completes, the released node is referenced causing a use-after-free null pointer dereference. Similarly, when processing non-zero ELS PLOGI completion status in lpfc_cmpl_els_plogi(), the ndlp flags are checked for a transport registration before triggering node removal. If dev-loss-evt work is pending, the node may be released prematurely and a subsequent call to lpfc_dev_loss_tmo_handler() results in a use after free ndlp dereference. Add test for pending dev-loss before decrementing the node reference count for FLOGI, PLOGI, PRLI, and ADISC handling.

Severity
high
Software
Kernel
Fixed in
5.18.3
Published
2025-02-26

Affected versions

From: 5.16

Until: 5.18.3

Fixed in: 5.18.3

How to fix this CVE

Update your Linux kernel to version 5.18.3 or later to resolve a critical null pointer dereference vulnerability in the lpfc SCSI driver. This vulnerability occurs when FLOGI or PLOGI commands fail and pending device-loss timeout work is scheduled, leading to premature node structure release and use-after-free conditions. Immediate kernel patching is recommended for systems running affected versions 5.16 through 5.18.2.

sudo dnf update kernel kernel-headers

Defensia detects this vulnerability

How to check if you are affected

  1. Step 1: Check installed kernel version with 'uname -r' and compare against affected range 5.16.x to 5.18.2
  2. Step 2: Verify lpfc driver is loaded with 'lsmod | grep lpfc' to determine if Fibre Channel SCSI subsystem is in use
  3. Step 3: Search kernel logs for null pointer dereference patterns with 'grep -i 'NULL pointer\|use after free\|lpfc' /var/log/kern.log | tail -50'
  4. Step 4: After patching, confirm kernel version updated with 'uname -r' and reboot if necessary to load patched kernel

FAQ

What is CVE-2022-49535?

CVE-2022-49535 is a use-after-free vulnerability in the Linux kernel's lpfc SCSI driver where device-loss timeout work scheduled before FLOGI/PLOGI command failures causes premature release of nodelist structures, resulting in null pointer dereferences when the deferred work attempts to access the freed node.

Is CVE-2022-49535 being actively exploited?

No, CVE-2022-49535 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are known, though the vulnerability could trigger denial of service through kernel crashes on affected systems.

What versions of Kernel are affected by CVE-2022-49535?

Linux kernel versions 5.16.x through 5.18.2 are affected. Version 5.18.3 and later contain the fix.

How do I check if my server is vulnerable to CVE-2022-49535?

Run 'uname -r' to check your kernel version; if it shows 5.16.x through 5.18.2 and 'lsmod | grep lpfc' returns results, your system is vulnerable and requires updating.

Does Defensia detect CVE-2022-49535?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2022-49535 will appear in your dashboard with remediation steps.

Related Kernel CVEs

CVE-2026-100075CVSS 9.8In the Linux kernel, the following vulnerability has been resolved: RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters When srpt_alloc_rw_ctxs() fails partway through a multi-buffer indirect descriptor, the unwind path destroys RDMA contexts but leaves stale n_rw_ctx and n_rdma values (and a dangling rw_ctxs pointer). Later sq_wr_avail accounting in srpt_queue_response() or srpt_write_pending() can then subtract the wrong number of send queue credits. Reset the counters and clear rw_ctxs after freeing the heap allocation before returning an error.
CVE-2026-64439CVSS 9.8In the Linux kernel, the following vulnerability has been resolved: crypto: krb5 - filter out async aead implementations at alloc krb5_aead_encrypt(), krb5_aead_decrypt() in rfc3961_simplified.c and rfc8009_encrypt(), rfc8009_decrypt() in rfc8009_aes2.c set a NULL completion callback and treat any negative return from crypto_aead_{encrypt,decrypt}() as terminal, falling through to kfree_sensitive(buffer). When the encrypt_name resolves to an async AEAD instance the request returns -EINPROGRESS, the buffer is freed while the backend's worker still holds a pointer, and the worker dereferences the freed slab on completion. KASAN report under UML+SLUB with a synthetic async aead backend bound to krb5->encrypt_name: BUG: KASAN: slab-use-after-free in t5_stub_complete+0x7d/0xc7 The helpers were written synchronously, so filter the async instances out at allocation time instead of plumbing crypto_wait_req() through every call site. Reachable via net/rxrpc/rxgk.c, fs/afs/cm_security.c and net/ceph/crypto.c on systems with an async AEAD provider bound to the krb5 enctype name.
CVE-2026-64047CVSS 9.8In the Linux kernel, the following vulnerability has been resolved: net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring When an sk_msg scatterlist ring wraps (sg.end < sg.start), tls_push_record() chains the tail portion of the ring to the head using sg_chain(). An extra entry in the sg array is reserved for this: struct sk_msg_sg { [...] /* The extra two elements: * 1) used for chaining the front and sections when the list becomes * partitioned (e.g. end < start). The crypto APIs require the * chaining; * 2) to chain tailer SG entries after the message. */ struct scatterlist data[MAX_MSG_FRAGS + 2]; The current code uses MAX_SKB_FRAGS + 1 as the ring size: sg_chain(&msg_pl->sg.data[msg_pl->sg.start], MAX_SKB_FRAGS - msg_pl->sg.start + 1, msg_pl->sg.data); This places the chain pointer at sg_chain(data[start], (MAX_SKB_FRAGS - msg_start + 1) .. = &data[start] + (MAX_SKB_FRAGS - msg_start + 1) - 1 = data[start + (MAX_SKB_FRAGS - start + 1) - 1] = data[MAX_SKB_FRAGS] instead of the true last entry. This is likely due to a "race" of the commit under Fixes landing close to commit 031097d9e079 ("bpf: sk_msg, zap ingress queue on psock down") Convert to ARRAY_SIZE and drop the data[start] / - start (as suggested by Sabrina).
CVE-2025-38660CVSS 9.8In the Linux kernel, the following vulnerability has been resolved: [ceph] parse_longname(): strrchr() expects NUL-terminated string ... and parse_longname() is not guaranteed that. That's the reason why it uses kmemdup_nul() to build the argument for kstrtou64(); the problem is, kstrtou64() is not the only thing that need it. Just get a NUL-terminated copy of the entire thing and be done with that...
CVE-2025-39682CVSS 9.8In the Linux kernel, the following vulnerability has been resolved: tls: fix handling of zero-length records on the rx_list Each recvmsg() call must process either - only contiguous DATA records (any number of them) - one non-DATA record If the next record has different type than what has already been processed we break out of the main processing loop. If the record has already been decrypted (which may be the case for TLS 1.3 where we don't know type until decryption) we queue the pending record to the rx_list. Next recvmsg() will pick it up from there. Queuing the skb to rx_list after zero-copy decrypt is not possible, since in that case we decrypted directly to the user space buffer, and we don't have an skb to queue (darg.skb points to the ciphertext skb for access to metadata like length). Only data records are allowed zero-copy, and we break the processing loop after each non-data record. So we should never zero-copy and then find out that the record type has changed. The corner case we missed is when the initial record comes from rx_list, and it's zero length.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49535. Free for 1 server.

Get started free