{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-50152",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-50152"
  ],
  "published": "2024-11-07T09:34:57Z",
  "summary": "smb: client: fix possible double free in smb2_set_ea()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix possible double free in smb2_set_ea()\n\nClang static checker(scan-build) warning\uff1a\nfs/smb/client/smb2ops.c:1304:2: Attempt to free released memory.\n 1304 |         kfree(ea);\n      |         ^~~~~~~~~\n\nThere is a double free in such case:\n'ea is initialized to NULL' -> 'first successful memory allocation for\nea' -> 'something failed, goto sea_exit' -> 'first memory release for ea'\n-> 'goto replay_again' -> 'second goto sea_exit before allocate memory\nfor ea' -> 'second memory release for ea resulted in double free'.\n\nRe-initialie 'ea' to NULL near to the replay_again label, it can fix this\ndouble free problem.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.6.47-1+rpt1",
        "1:6.6.51-1+rpt1",
        "1:6.6.51-1+rpt2",
        "1:6.6.51-1+rpt3"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-2712",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v6",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v7",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v7l",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v8",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v6",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7l",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v6",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7l",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-2712",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v6",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v7l",
            "binary_version": "1:6.6.51-1+rpt3"
          },
          {
            "binary_name": "linux-image-6.6.51+rpt-rpi-v8",
            "binary_version": "1:6.6.51-1+rpt3"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.47-1+rpt1": {
            "linux_commit": "cf64a1dfecc2dc418efdd61701c1a4b185ab4761",
            "upstream_version": "6.6.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.59"
          },
          "1:6.6.51-1+rpt1": {
            "linux_commit": "0094eba3f2a4338cfa6854b0b5104d02ba0fa01f",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.59"
          },
          "1:6.6.51-1+rpt2": {
            "linux_commit": "82a50e430ef1d6eb37d78e25aa572c1f6ea56160",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.59"
          },
          "1:6.6.51-1+rpt3": {
            "linux_commit": "5aeecea9f4a45248bcf564dec924965e066a7bfd",
            "upstream_version": "6.6.51",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.59"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-50152"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b1813c220b76f60b1727984794377c4aa849d4c1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The bug is driven entirely by data from a remote SMB peer over TCP/445 \u2014 the server induces the replay by resetting the connection (`-EAGAIN`) and then returns `STATUS_NO_EAS_ON_FILE`/an oversized `OutputBufferLength` to force the early `sea_exit` on the retry. A compromised file server or an on-path attacker spoofing SMB responses reaches it with no local access.\nAC:L - The malicious server deterministically controls both halves of the sequence \u2014 dropping the TCP connection mid-request and crafting the QUERY_INFO reply on the replay \u2014 needing only two round trips, with no race or memory-layout condition outside its control. Mounted shares see routine xattr traffic from backup, archive, and desktop-metadata tooling.\nPR:N - A malicious or compromised SMB server holds no privileges whatsoever on the victim client, and nothing on the code path checks server trust. Even in a purely local framing, only ordinary write access to a file on the share is needed.\nUI:N - No victim action is required at exploitation time \u2014 the mount is already established via fstab/autofs/systemd, and the setxattr/removexattr that enters `smb2_set_ea()` is generated by ordinary background activity such as `rsync -X`, `cp -a`, `tar --xattrs`, or indexing daemons.\nS:U - The double free corrupts the kernel slab allocator within the same security authority as the vulnerable code; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The second `kfree()` releases a chunk that has almost certainly been reallocated to another live kernel object, producing a use-after-free with two owners; the attacker-chosen allocation size enables grooming into a targeted kmalloc cache and reading back arbitrary kernel data.\nI:H - Double-free/UAF of an attacker-sized slab object is the canonical primitive for heap spraying and controlled overwrite of an adjacent or aliased structure, giving arbitrary write and control-flow hijack potential.\nA:H - Even unexploited, the double free triggers slab freelist corruption or an immediate `BUG()` under `CONFIG_SLAB_FREELIST_HARDENED`, causing a kernel oops/panic that is remotely and repeatably inducible by the server."
    }
  }
}
