{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53635",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-53635"
  ],
  "published": "2025-10-07T15:20:13Z",
  "summary": "netfilter: conntrack: fix wrong ct->timeout value",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: conntrack: fix wrong ct->timeout value\n\n(struct nf_conn)->timeout is an interval before the conntrack\nconfirmed.  After confirmed, it becomes a timestamp.\n\nIt is observed that timeout of an unconfirmed conntrack:\n- Set by calling ctnetlink_change_timeout(). As a result,\n  `nfct_time_stamp` was wrongly added to `ct->timeout` twice.\n- Get by calling ctnetlink_dump_timeout(). As a result,\n  `nfct_time_stamp` was wrongly subtracted.\n\nCall Trace:\n <TASK>\n dump_stack_lvl\n ctnetlink_dump_timeout\n __ctnetlink_glue_build\n ctnetlink_glue_build\n __nfqnl_enqueue_packet\n nf_queue\n nf_hook_slow\n ip_mc_output\n ? __pfx_ip_finish_output\n ip_send_skb\n ? __pfx_dst_output\n udp_send_skb\n udp_sendmsg\n ? __pfx_ip_generic_getfrag\n sock_sendmsg\n\nSeparate the 2 cases in:\n- Setting `ct->timeout` in __nf_ct_set_timeout().\n- Getting `ct->timeout` in ctnetlink_dump_timeout().\n\nPablo appends:\n\nUpdate ctnetlink to set up the timeout _after_ the IPS_CONFIRMED flag is\nset on, otherwise conntrack creation via ctnetlink breaks.\n\nNote that the problem described in this patch occurs since the\nintroduction of the nfnetlink_queue conntrack support, select a\nsufficiently old Fixes: tag for -stable kernel to pick up this fix.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.28"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53635"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/80c5ba0078e20d926d11d0778f9a43902664ebf0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ff5e4ac8dd7be7f1faba955c5779a68571eeb0f8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f612ae1ab4793701caf39386fb3b7f4b3ef44e48"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/73db1b8f2bb6725b7391e85aab41fdf592b3c0c1"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 8.2,
      "cvss_v3_severity": "High",
      "scenario": "AV:N - The corruption occurs in the conntrack packet path \u2014 every new flow traversing an NFQUEUE-with-conntrack ruleset (IPS/firewall daemons) or a tc/XDP conntrack BPF program gets its `ct->timeout` mangled during `nf_hook_slow`/`nf_confirm` processing of received packets. A remote peer sending traffic to such a host drives the enqueue/verdict/confirm cycle and controls the rate at which broken entries accumulate.\nAC:L - The double-add of `nfct_time_stamp` is deterministic for every unconfirmed conntrack whose timeout is set, with no race, memory-layout, or timing dependency; the attacker simply generates new flows. Scoring the vulnerable (queue/BPF conntrack-enabled) deployment, no condition lies outside the attacker's control.\nPR:N - On a host running a conntrack-aware NFQUEUE daemon or BPF conntrack program, unauthenticated remote packets are sufficient to create the mis-timed entries \u2014 no credentials on the target are needed. Even in the purely local framing, the nfnetlink gate is `netlink_net_capable(CAP_NET_ADMIN)`, which is namespace-scoped and reachable by an unprivileged user via `unshare -Urn`.\nUI:N - Exploitation is entirely driven by network traffic and the kernel's own enqueue/verdict/confirm cycle; no victim action of any kind is required.\nS:U - The corrupted state (`ct->timeout`) and its effects stay within the kernel networking subsystem's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:N - No kernel memory is read out of bounds and no sensitive data is exposed; the only wrong value returned is a bogus timeout in `ctnetlink_dump_timeout()`, delivered to an already-privileged queue daemon and derived from `jiffies`, which is not sensitive.\nI:L - The bug writes an incorrect lifetime into kernel-managed connection-tracking state, so tracked flows either persist far past their policy-mandated expiry (keeping stateful `ESTABLISHED` acceptance and NAT bindings alive) or vanish immediately, altering the firewall policy the kernel enforces. The modification is limited and its resulting value is not attacker-chosen.\nA:H - Entries that never age out fill the conntrack table, after which the host drops all new connections (`nf_conntrack: table full`) and the condition persists for days rather than the configured 30\u2013120 s; in the opposite regime every new entry is expired at confirmation, breaking stateful filtering and NAT for all traffic. Either outcome is a complete loss of the host's networking availability."
    }
  }
}
