CVE-2023-1095 Overview
CVE-2023-1095 is a Null Pointer Dereference vulnerability in the Linux kernel's nf_tables subsystem. The vulnerability exists in the nf_tables_updtable function where, if nf_tables_table_enable returns an error, nft_trans_destroy is called to free the transaction object. The nft_trans_destroy() function calls list_del(), but the transaction was never placed on a list—the list head is all zeroes—resulting in a NULL pointer dereference that can cause a denial of service condition.
Critical Impact
Local attackers with low privileges can trigger a NULL pointer dereference in the Linux kernel's netfilter subsystem, causing system crashes and denial of service conditions affecting system availability.
Affected Products
- Linux Kernel (all affected versions)
- Red Hat Enterprise Linux 8.0
- Red Hat Enterprise Linux 9.0
Discovery Timeline
- 2023-02-28 - CVE-2023-1095 published to NVD
- 2025-03-18 - Last updated in NVD database
Technical Details for CVE-2023-1095
Vulnerability Analysis
This vulnerability is classified as CWE-476 (NULL Pointer Dereference). The flaw resides in the netfilter nf_tables API implementation within the Linux kernel. When a table update operation fails during the enable phase, the error handling path attempts to destroy the transaction object by calling nft_trans_destroy(). This function internally invokes list_del() to remove the transaction from a linked list. However, the transaction object was never added to any list during the failed operation, leaving its list head structure in an uninitialized (zeroed) state.
When list_del() operates on a zeroed list head, it attempts to dereference NULL pointers in the list traversal operations, triggering a kernel NULL pointer dereference. This results in a kernel panic or oops, effectively crashing the system.
Root Cause
The root cause is improper initialization of the transaction object's list head before potential error paths are reached. The transaction's list member was not initialized with INIT_LIST_HEAD() upon allocation, meaning if an error occurred before the transaction was added to any list, the subsequent cleanup code would operate on uninitialized memory containing zeroes.
Attack Vector
The vulnerability requires local access and low privileges to exploit. An attacker with the ability to interact with the netfilter/nf_tables subsystem (typically requiring CAP_NET_ADMIN capability or root privileges) can craft operations that trigger the error path in nf_tables_table_enable, leading to the NULL pointer dereference. While this doesn't allow code execution or data theft, it effectively enables a denial of service attack by crashing the kernel.
if (trans == NULL)
return NULL;
+ INIT_LIST_HEAD(&trans->list);
trans->msg_type = msg_type;
trans->ctx = *ctx;
Source: GitHub Linux Commit Update
Detection Methods for CVE-2023-1095
Indicators of Compromise
- Unexpected kernel panics or oops messages referencing nf_tables_updtable or nft_trans_destroy in stack traces
- System crashes occurring during netfilter/nftables configuration operations
- Kernel log entries showing NULL pointer dereference in net/netfilter/nf_tables_api.c
- Repeated system reboots following nftables rule modifications
Detection Strategies
- Monitor kernel logs (dmesg, /var/log/kern.log) for NULL pointer dereference errors in the nf_tables subsystem
- Implement kernel crash dump analysis to identify stack traces involving nft_trans_destroy or list_del operations
- Deploy SentinelOne agents to detect anomalous kernel behavior patterns indicating exploitation attempts
- Configure audit rules to log all netfilter/nftables configuration changes and correlate with system stability events
Monitoring Recommendations
- Enable kernel crash dump collection (kdump) to capture diagnostic information during exploitation attempts
- Monitor for unusual patterns of nftables configuration commands that may indicate probing for the vulnerability
- Set up automated alerting for kernel oops or panic events on production systems
- Review system uptime metrics for unexpected reboot patterns that may indicate DoS exploitation
How to Mitigate CVE-2023-1095
Immediate Actions Required
- Apply the latest kernel security updates from your Linux distribution vendor
- Restrict access to netfilter/nftables configuration to trusted administrators only
- Consider limiting CAP_NET_ADMIN capabilities to essential processes and users
- Implement monitoring for kernel crashes to detect potential exploitation attempts
Patch Information
The vulnerability has been addressed in the upstream Linux kernel through commit 580077855a40741cf511766129702d97ff02f4d9. The fix adds proper initialization of the transaction's list head using INIT_LIST_HEAD(&trans->list) immediately after allocation, ensuring the list structure is in a valid state even if error paths are taken before the transaction is added to a list.
For detailed patch information, refer to:
Workarounds
- Limit access to nftables configuration interfaces to only essential administrative accounts
- Use SELinux or AppArmor policies to restrict which processes can interact with netfilter subsystems
- Consider disabling nf_tables module loading if not required: modprobe -r nf_tables (note: this may impact firewall functionality)
- Implement kernel live patching solutions where available to apply fixes without system reboot
# Check current kernel version for vulnerability status
uname -r
# Verify if nf_tables module is loaded
lsmod | grep nf_tables
# Review users with CAP_NET_ADMIN capability
getcap -r / 2>/dev/null | grep cap_net_admin
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


