{
  "id": "CVE-2025-38396",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38396",
  "published_at": "2025-07-25T12:53:40.761Z",
  "title": "fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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\nfs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass\n\nExport anon_inode_make_secure_inode() to allow KVM guest_memfd to create\nanonymous inodes with proper security context. This replaces the current\npattern of calling alloc_anon_inode() followed by\ninode_init_security_anon() for creating security context manually.\n\nThis change also fixes a security regression in secretmem where the\nS_PRIVATE flag was not cleared after alloc_anon_inode(), causing\nLSM/SELinux checks to be bypassed for secretmem file descriptors.\n\nAs guest_memfd currently resides in the KVM module, we need to export this\nsymbol for use outside the core kernel. In the future, guest_memfd might be\nmoved to core-mm, at which point the symbols no longer would have to be\nexported. When/if that happens is still unclear.",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 2bfe15c5261212130f1a71f32a300bcf426443d4, \u003c 66d29d757c968d2bee9124816da5d718eb352959",
          "\u003e= 2bfe15c5261212130f1a71f32a300bcf426443d4, \u003c e3eed01347721cd7a8819568161c91d538fbf229",
          "\u003e= 2bfe15c5261212130f1a71f32a300bcf426443d4, \u003c f94c422157f3e43dd31990567b3e5d54b3e5b32b",
          "\u003e= 2bfe15c5261212130f1a71f32a300bcf426443d4, \u003c 6ca45ea48530332a4ba09595767bd26d3232743b",
          "\u003e= 2bfe15c5261212130f1a71f32a300bcf426443d4, \u003c cbe4134ea4bc493239786220bd69cb8a13493190"
        ],
        "fixed_in": [
          "66d29d757c968d2bee9124816da5d718eb352959",
          "e3eed01347721cd7a8819568161c91d538fbf229",
          "f94c422157f3e43dd31990567b3e5d54b3e5b32b",
          "6ca45ea48530332a4ba09595767bd26d3232743b",
          "cbe4134ea4bc493239786220bd69cb8a13493190"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.0"
        ],
        "fixed_in": [
          "0",
          "6.1.146",
          "6.6.97",
          "6.12.37",
          "6.15.6",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 66d29d757c968d2bee9124816da5d718eb352959 or e3eed01347721cd7a8819568161c91d538fbf229 or f94c422157f3e43dd31990567b3e5d54b3e5b32b or 6ca45ea48530332a4ba09595767bd26d3232743b or cbe4134ea4bc493239786220bd69cb8a13493190 or later.",
      "Upgrade Linux to 0 or 6.1.146 or 6.6.97 or 6.12.37 or 6.15.6 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
