Skip to content
OpenAdvisories

Weakness (CWE)

CWE-476: NULL Pointer Dereference

Base

The product dereferences a pointer that it expects to be valid but is NULL.

How to prevent it (5 mitigations)
  1. Implementation

    For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].

  2. Requirements

    Select a programming language that is not susceptible to these issues.

  3. Implementation

    Check the results of all functions that return a value and verify that the value is non-null before acting upon it.

  4. Architecture and Design

    Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.

  5. Implementation

    Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.

Source: MITRE CWE-476

2,669 results · Feed

  • Medium 5.5

    vsock/bpf: return early if transport is not assigned

    In the Linux kernel, the following vulnerability has been resolved: vsock/bpf: return early if transport is not assigned Some of the core functions can only be called if the transport has been assigned. As Michal reported, a socket might have the transport at…

  • Medium 5.5

    vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]

    In the Linux kernel, the following vulnerability has been resolved: vsock: prevent null-ptr-deref in vsock_*[has_data|has_space] Recent reports have shown how we sometimes call vsock_*_has_data() when a vsock socket has been de-assigned from a transport (see …

  • Medium 6.5

    In macrozheng mall-tiny 1.0.1, an attacker can send null data through the resource creation interface resulting in a nu…

  • High 7.5

    A null pointer dereference was addressed with improved input validation. This issue is fixed in iOS 18.3 and iPadOS 18.…

  • Medium 5.3

    A NULL Pointer Dereference vulnerability in Cesanta Frozen versions less than 1.7 allows an attacker to induce a crash …

  • Medium 6.5

    OpenImageIO v3.1.0.0dev was discovered to contain a segmentation violation via the component /OpenImageIO/string_view.h.

  • Medium 5.5

    gpac 2.4 contains a SEGV at src/isomedia/drm_sample.c:1562:96 in isom_cenc_get_sai_by_saiz_saio in MP4Box.

  • Medium 6.5

    lunasvg v3.0.0 was discovered to contain a segmentation violation via the component blend_transformed_tiled_argb.isra.0.

  • Medium 5.5

    btrfs: avoid NULL pointer dereference if no valid extent tree

    In the Linux kernel, the following vulnerability has been resolved: btrfs: avoid NULL pointer dereference if no valid extent tree [BUG] Syzbot reported a crash with the following call trace: BTRFS info (device loop0): scrub: started on devid 1 BUG: kernel NUL…

  • Medium 5.5

    iio: adc: ti-ads1298: Add NULL check in ads1298_init

    In the Linux kernel, the following vulnerability has been resolved: iio: adc: ti-ads1298: Add NULL check in ads1298_init devm_kasprintf() can return a NULL pointer on failure. A check on the return value of such a call in ads1298_init() is missing. Add it.

  • Medium 4.7

    fgraph: Add READ_ONCE() when accessing fgraph_array[]

    In the Linux kernel, the following vulnerability has been resolved: fgraph: Add READ_ONCE() when accessing fgraph_array[] In __ftrace_return_to_handler(), a loop iterates over the fgraph_array[] elements, which are fgraph_ops. The loop checks if an element is…

  • Medium 5.5

    gve: guard XSK operations on the existence of queues

    In the Linux kernel, the following vulnerability has been resolved: gve: guard XSK operations on the existence of queues This patch predicates the enabling and disabling of XSK pools on the existence of queues. As it stands, if the interface is down, disablin…

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 5.7

    Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit 08…

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    A Null pointer dereference vulnerability in the Mobile Management Entity (MME) in Magma <= 1.8.0 (fixed in v1.9 commit …

  • Medium 6.5

    An uninitialized pointer dereference in the ngap_handle_pdu_session_resource_setup_response routine of OpenAirInterface…

  • High 7.5

    A NULL pointer dereference in the ngap_app::handle_receive routine of OpenAirInterface CN5G AMF (oai-cn5g-amf) up to v2…

  • Medium 6.5

    OpenAirInterface CN5G AMF (oai-cn5g-amf) <= 2.0.0 contains a null dereference in its handling of unsupported NGAP proto…

  • High 7.7

    Sunshine improperly enforces pairing protocol request order

    Sunshine is a self-hosted game stream host for Moonlight. In 0.23.1 and earlier, Sunshine's pairing protocol implementation does not validate request order and is thereby vulnerable to a MITM attack, potentially allowing an unauthenticated attacker to pair a …

  • Medium 5.5

    nfs: Fix oops in nfs_netfs_init_request() when copying to cache

    In the Linux kernel, the following vulnerability has been resolved: nfs: Fix oops in nfs_netfs_init_request() when copying to cache When netfslib wants to copy some data that has just been read on behalf of nfs, it creates a new write request and calls nfs_ne…

  • High 7.1

    ksmbd: fix a missing return value check bug

    In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix a missing return value check bug In the smb2_send_interim_resp(), if ksmbd_alloc_work_struct() fails to allocate a node, it returns a NULL pointer to the in_work pointer. This can …

  • Medium 5.5

    usb: typec: tcpci: fix NULL pointer issue on shared irq case

    In the Linux kernel, the following vulnerability has been resolved: usb: typec: tcpci: fix NULL pointer issue on shared irq case The tcpci_irq() may meet below NULL pointer dereference issue: [ 2.641851] Unable to handle kernel NULL pointer dereference at vir…

  • Medium 5.5

    net: hns3: fix kernel crash when 1588 is sent on HIP08 devices

    In the Linux kernel, the following vulnerability has been resolved: net: hns3: fix kernel crash when 1588 is sent on HIP08 devices Currently, HIP08 devices does not register the ptp devices, so the hdev->ptp is NULL. But the tx process would still try to set …

  • Medium 5.5

    drm/xe: Fix tlb invalidation when wedging

    In the Linux kernel, the following vulnerability has been resolved: drm/xe: Fix tlb invalidation when wedging If GuC fails to load, the driver wedges, but in the process it tries to do stuff that may not be initialized yet. This moves the xe_gt_tlb_invalidati…

  • Medium 5.5

    mptcp: sysctl: sched: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: mptcp: sysctl: sched: avoid using current->nsproxy Using the 'net' structure via 'current' is not recommended for different reasons. First, if the goal is to use it to read or write per-netns…

  • Medium 5.5

    mptcp: sysctl: blackhole timeout: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: mptcp: sysctl: blackhole timeout: avoid using current->nsproxy As mentioned in the previous commit, using the 'net' structure via 'current' is not recommended for different reasons: - Inconsi…

  • Medium 5.5

    sctp: sysctl: rto_min/max: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: sctp: sysctl: rto_min/max: avoid using current->nsproxy As mentioned in a previous commit of this series, using the 'net' structure via 'current' is not recommended for different reasons: - I…

  • High 7.1

    sctp: sysctl: udp_port: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: sctp: sysctl: udp_port: avoid using current->nsproxy As mentioned in a previous commit of this series, using the 'net' structure via 'current' is not recommended for different reasons: - Inco…

  • Medium 5.5

    sctp: sysctl: plpmtud_probe_interval: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: sctp: sysctl: plpmtud_probe_interval: avoid using current->nsproxy As mentioned in a previous commit of this series, using the 'net' structure via 'current' is not recommended for different r…

  • Medium 5.5

    rds: sysctl: rds_tcp_{rcv,snd}buf: avoid using current->nsproxy

    In the Linux kernel, the following vulnerability has been resolved: rds: sysctl: rds_tcp_{rcv,snd}buf: avoid using current->nsproxy As mentioned in a previous commit of this series, using the 'net' structure via 'current' is not recommended for different reas…