{
  "id": "CVE-2026-52942",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-52942",
  "published_at": "2026-06-24T07:14:30.61Z",
  "title": "netfilter: nf_log: validate MAC header was set before dumping it",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.1,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nf_log: validate MAC header was set before dumping it\n\nThe fallback path of dump_mac_header() guards the MAC header access\nonly with \"skb-\u003emac_header != skb-\u003enetwork_header\", without checking\nskb_mac_header_was_set(). When the MAC header is unset, mac_header is\n0xffff, so the test passes and skb_mac_header(skb) returns\nskb-\u003ehead + 0xffff, ~64 KiB past the buffer; the loop then reads\ndev-\u003ehard_header_len bytes out of bounds into the kernel log.\n\nThis is reachable via the netdev logger: nf_log_unknown_packet() calls\ndump_mac_header() unconditionally, and an skb sent through AF_PACKET\nwith PACKET_QDISC_BYPASS reaches the egress hook with mac_header still\nunset (__dev_queue_xmit(), which would reset it, is bypassed).\n\nAdd the skb_mac_header_was_set() check the ARPHRD_ETHER path already\nuses, and replace the open-coded MAC header length test with\nskb_mac_header_len(). Only skbs with an unset MAC header are affected;\nvalid ones are dumped as before.\n\n BUG: KASAN: slab-out-of-bounds in dump_mac_header (net/netfilter/nf_log_syslog.c:831)\n Read of size 1 at addr ffff88800ea49d3f by task exploit/148\n Call Trace:\n  kasan_report (mm/kasan/report.c:595)\n  dump_mac_header (net/netfilter/nf_log_syslog.c:831)\n  nf_log_netdev_packet (net/netfilter/nf_log_syslog.c:938 net/netfilter/nf_log_syslog.c:963)\n  nf_log_packet (net/netfilter/nf_log.c:260)\n  nft_log_eval (net/netfilter/nft_log.c:60)\n  nft_do_chain (net/netfilter/nf_tables_core.c:285)\n  nft_do_chain_netdev (net/netfilter/nft_chain_filter.c:307)\n  nf_hook_slow (net/netfilter/core.c:619)\n  nf_hook_direct_egress (net/packet/af_packet.c:257)\n  packet_xmit (net/packet/af_packet.c:280)\n  packet_sendmsg (net/packet/af_packet.c:3114)\n  __sys_sendto (net/socket.c:2265)",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc7:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c 2e96e1bc9b4d5450e6c33f078e19a9bc1dda6c0b",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c d704ee9c7bc68a161684c51a7ac05b446dcf38d4",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c befb8968a2abdfa948d5600ea7f7a509a292a590",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c 8a81e336da685423f5b64aac4d571e63d674c52a",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c c38d41134085193efd5b237cf513ad5b3421a60d",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c af1b7699466f6556b351fa25d3dc870abfb5d310",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c 65ef7397eb9a296e91839f5fd10be96f23d332e7",
          "\u003e= 7eb9282cd0efac08b8377cbd5037ba297c77e3f7, \u003c a84b6fedbc97078788be78dbdd7517d143ad1a77"
        ],
        "fixed_in": [
          "2e96e1bc9b4d5450e6c33f078e19a9bc1dda6c0b",
          "d704ee9c7bc68a161684c51a7ac05b446dcf38d4",
          "befb8968a2abdfa948d5600ea7f7a509a292a590",
          "8a81e336da685423f5b64aac4d571e63d674c52a",
          "c38d41134085193efd5b237cf513ad5b3421a60d",
          "af1b7699466f6556b351fa25d3dc870abfb5d310",
          "65ef7397eb9a296e91839f5fd10be96f23d332e7",
          "a84b6fedbc97078788be78dbdd7517d143ad1a77"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.36"
        ],
        "fixed_in": [
          "0",
          "5.10.261",
          "5.15.210",
          "6.1.176",
          "6.6.143",
          "6.12.94",
          "6.18.36",
          "7.0.13",
          "7.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 2e96e1bc9b4d5450e6c33f078e19a9bc1dda6c0b or d704ee9c7bc68a161684c51a7ac05b446dcf38d4 or befb8968a2abdfa948d5600ea7f7a509a292a590 or 8a81e336da685423f5b64aac4d571e63d674c52a or c38d41134085193efd5b237cf513ad5b3421a60d or af1b7699466f6556b351fa25d3dc870abfb5d310 or 65ef7397eb9a296e91839f5fd10be96f23d332e7 or a84b6fedbc97078788be78dbdd7517d143ad1a77 or later.",
      "Upgrade Linux to 0 or 5.10.261 or 5.15.210 or 6.1.176 or 6.6.143 or 6.12.94 or 6.18.36 or 7.0.13 or 7.1 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
