GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40355 (GCVE-0-2025-40355)

Vulnerability from cvelistv5 – Published: 2025-12-16 13:30 – Updated: 2026-05-11 21:47
VLAI
Title
sysfs: check visibility before changing group attribute ownership
Summary
In the Linux kernel, the following vulnerability has been resolved: sysfs: check visibility before changing group attribute ownership Since commit 0c17270f9b92 ("net: sysfs: Implement is_visible for phys_(port_id, port_name, switch_id)"), __dev_change_net_namespace() can hit WARN_ON() when trying to change owner of a file that isn't visible. See the trace below: WARNING: CPU: 6 PID: 2938 at net/core/dev.c:12410 __dev_change_net_namespace+0xb89/0xc30 CPU: 6 UID: 0 PID: 2938 Comm: incusd Not tainted 6.17.1-1-mainline #1 PREEMPT(full) 4b783b4a638669fb644857f484487d17cb45ed1f Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.07 02/19/2025 RIP: 0010:__dev_change_net_namespace+0xb89/0xc30 [...] Call Trace: <TASK> ? if6_seq_show+0x30/0x50 do_setlink.isra.0+0xc7/0x1270 ? __nla_validate_parse+0x5c/0xcc0 ? security_capable+0x94/0x1a0 rtnl_newlink+0x858/0xc20 ? update_curr+0x8e/0x1c0 ? update_entity_lag+0x71/0x80 ? sched_balance_newidle+0x358/0x450 ? psi_task_switch+0x113/0x2a0 ? __pfx_rtnl_newlink+0x10/0x10 rtnetlink_rcv_msg+0x346/0x3e0 ? sched_clock+0x10/0x30 ? __pfx_rtnetlink_rcv_msg+0x10/0x10 netlink_rcv_skb+0x59/0x110 netlink_unicast+0x285/0x3c0 ? __alloc_skb+0xdb/0x1a0 netlink_sendmsg+0x20d/0x430 ____sys_sendmsg+0x39f/0x3d0 ? import_iovec+0x2f/0x40 ___sys_sendmsg+0x99/0xe0 __sys_sendmsg+0x8a/0xf0 do_syscall_64+0x81/0x970 ? __sys_bind+0xe3/0x110 ? syscall_exit_work+0x143/0x1b0 ? do_syscall_64+0x244/0x970 ? sock_alloc_file+0x63/0xc0 ? syscall_exit_work+0x143/0x1b0 ? do_syscall_64+0x244/0x970 ? alloc_fd+0x12e/0x190 ? put_unused_fd+0x2a/0x70 ? do_sys_openat2+0xa2/0xe0 ? syscall_exit_work+0x143/0x1b0 ? do_syscall_64+0x244/0x970 ? exc_page_fault+0x7e/0x1a0 entry_SYSCALL_64_after_hwframe+0x76/0x7e [...] </TASK> Fix this by checking is_visible() before trying to touch the attribute.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60 , < ac2c526e103285d80a0330b91a318f6c9276d35a (git)
Affected: 303a42769c4c4d8e5e3ad928df87eb36f8c1fa60 , < c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.7
Unaffected: 0 , < 5.7 (semver)
Unaffected: 6.17.6 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/sysfs/group.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ac2c526e103285d80a0330b91a318f6c9276d35a",
              "status": "affected",
              "version": "303a42769c4c4d8e5e3ad928df87eb36f8c1fa60",
              "versionType": "git"
            },
            {
              "lessThan": "c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33",
              "status": "affected",
              "version": "303a42769c4c4d8e5e3ad928df87eb36f8c1fa60",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/sysfs/group.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.7"
            },
            {
              "lessThan": "5.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.6",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "5.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsysfs: check visibility before changing group attribute ownership\n\nSince commit 0c17270f9b92 (\"net: sysfs: Implement is_visible for\nphys_(port_id, port_name, switch_id)\"), __dev_change_net_namespace() can\nhit WARN_ON() when trying to change owner of a file that isn\u0027t visible.\nSee the trace below:\n\n WARNING: CPU: 6 PID: 2938 at net/core/dev.c:12410 __dev_change_net_namespace+0xb89/0xc30\n CPU: 6 UID: 0 PID: 2938 Comm: incusd Not tainted 6.17.1-1-mainline #1 PREEMPT(full)  4b783b4a638669fb644857f484487d17cb45ed1f\n Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.07 02/19/2025\n RIP: 0010:__dev_change_net_namespace+0xb89/0xc30\n [...]\n Call Trace:\n  \u003cTASK\u003e\n  ? if6_seq_show+0x30/0x50\n  do_setlink.isra.0+0xc7/0x1270\n  ? __nla_validate_parse+0x5c/0xcc0\n  ? security_capable+0x94/0x1a0\n  rtnl_newlink+0x858/0xc20\n  ? update_curr+0x8e/0x1c0\n  ? update_entity_lag+0x71/0x80\n  ? sched_balance_newidle+0x358/0x450\n  ? psi_task_switch+0x113/0x2a0\n  ? __pfx_rtnl_newlink+0x10/0x10\n  rtnetlink_rcv_msg+0x346/0x3e0\n  ? sched_clock+0x10/0x30\n  ? __pfx_rtnetlink_rcv_msg+0x10/0x10\n  netlink_rcv_skb+0x59/0x110\n  netlink_unicast+0x285/0x3c0\n  ? __alloc_skb+0xdb/0x1a0\n  netlink_sendmsg+0x20d/0x430\n  ____sys_sendmsg+0x39f/0x3d0\n  ? import_iovec+0x2f/0x40\n  ___sys_sendmsg+0x99/0xe0\n  __sys_sendmsg+0x8a/0xf0\n  do_syscall_64+0x81/0x970\n  ? __sys_bind+0xe3/0x110\n  ? syscall_exit_work+0x143/0x1b0\n  ? do_syscall_64+0x244/0x970\n  ? sock_alloc_file+0x63/0xc0\n  ? syscall_exit_work+0x143/0x1b0\n  ? do_syscall_64+0x244/0x970\n  ? alloc_fd+0x12e/0x190\n  ? put_unused_fd+0x2a/0x70\n  ? do_sys_openat2+0xa2/0xe0\n  ? syscall_exit_work+0x143/0x1b0\n  ? do_syscall_64+0x244/0x970\n  ? exc_page_fault+0x7e/0x1a0\n  entry_SYSCALL_64_after_hwframe+0x76/0x7e\n [...]\n  \u003c/TASK\u003e\n\nFix this by checking is_visible() before trying to touch the attribute."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T21:47:46.047Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ac2c526e103285d80a0330b91a318f6c9276d35a"
        },
        {
          "url": "https://git.kernel.org/stable/c/c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33"
        }
      ],
      "title": "sysfs: check visibility before changing group attribute ownership",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40355",
    "datePublished": "2025-12-16T13:30:28.017Z",
    "dateReserved": "2025-04-16T07:20:57.187Z",
    "dateUpdated": "2026-05-11T21:47:46.047Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40355",
      "date": "2026-09-16",
      "epss": "0.00185",
      "percentile": "0.08291"
    },
    "microsoft_vex": {
      "current_release_date": "2026-09-12T01:46:03.000Z",
      "cve": "CVE-2025-40355",
      "id": "msrc_CVE-2025-40355",
      "initial_release_date": "2025-12-17T01:03:54.000Z",
      "product_status:known_affected": "15",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "sysfs: check visibility before changing group attribute ownership",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-40355.json",
      "version": "17"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40355\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-16T14:15:47.423\",\"lastModified\":\"2026-06-17T09:21:42.540\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nsysfs: check visibility before changing group attribute ownership\\n\\nSince commit 0c17270f9b92 (\\\"net: sysfs: Implement is_visible for\\nphys_(port_id, port_name, switch_id)\\\"), __dev_change_net_namespace() can\\nhit WARN_ON() when trying to change owner of a file that isn\u0027t visible.\\nSee the trace below:\\n\\n WARNING: CPU: 6 PID: 2938 at net/core/dev.c:12410 __dev_change_net_namespace+0xb89/0xc30\\n CPU: 6 UID: 0 PID: 2938 Comm: incusd Not tainted 6.17.1-1-mainline #1 PREEMPT(full)  4b783b4a638669fb644857f484487d17cb45ed1f\\n Hardware name: Framework Laptop 13 (AMD Ryzen 7040Series)/FRANMDCP07, BIOS 03.07 02/19/2025\\n RIP: 0010:__dev_change_net_namespace+0xb89/0xc30\\n [...]\\n Call Trace:\\n  \u003cTASK\u003e\\n  ? if6_seq_show+0x30/0x50\\n  do_setlink.isra.0+0xc7/0x1270\\n  ? __nla_validate_parse+0x5c/0xcc0\\n  ? security_capable+0x94/0x1a0\\n  rtnl_newlink+0x858/0xc20\\n  ? update_curr+0x8e/0x1c0\\n  ? update_entity_lag+0x71/0x80\\n  ? sched_balance_newidle+0x358/0x450\\n  ? psi_task_switch+0x113/0x2a0\\n  ? __pfx_rtnl_newlink+0x10/0x10\\n  rtnetlink_rcv_msg+0x346/0x3e0\\n  ? sched_clock+0x10/0x30\\n  ? __pfx_rtnetlink_rcv_msg+0x10/0x10\\n  netlink_rcv_skb+0x59/0x110\\n  netlink_unicast+0x285/0x3c0\\n  ? __alloc_skb+0xdb/0x1a0\\n  netlink_sendmsg+0x20d/0x430\\n  ____sys_sendmsg+0x39f/0x3d0\\n  ? import_iovec+0x2f/0x40\\n  ___sys_sendmsg+0x99/0xe0\\n  __sys_sendmsg+0x8a/0xf0\\n  do_syscall_64+0x81/0x970\\n  ? __sys_bind+0xe3/0x110\\n  ? syscall_exit_work+0x143/0x1b0\\n  ? do_syscall_64+0x244/0x970\\n  ? sock_alloc_file+0x63/0xc0\\n  ? syscall_exit_work+0x143/0x1b0\\n  ? do_syscall_64+0x244/0x970\\n  ? alloc_fd+0x12e/0x190\\n  ? put_unused_fd+0x2a/0x70\\n  ? do_sys_openat2+0xa2/0xe0\\n  ? syscall_exit_work+0x143/0x1b0\\n  ? do_syscall_64+0x244/0x970\\n  ? exc_page_fault+0x7e/0x1a0\\n  entry_SYSCALL_64_after_hwframe+0x76/0x7e\\n [...]\\n  \u003c/TASK\u003e\\n\\nFix this by checking is_visible() before trying to touch the attribute.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/sysfs/group.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"303a42769c4c4d8e5e3ad928df87eb36f8c1fa60\",\"lessThan\":\"ac2c526e103285d80a0330b91a318f6c9276d35a\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"303a42769c4c4d8e5e3ad928df87eb36f8c1fa60\",\"lessThan\":\"c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/sysfs/group.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.7\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.7\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.6\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/ac2c526e103285d80a0330b91a318f6c9276d35a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c7fbb8218b4ad35fec0bd2256d2b9c8d60331f33\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-06-30T02:59:53+00:00",
      "cve": "CVE-2025-40355",
      "id": "CVE-2025-40355",
      "initial_release_date": "2025-12-16T00:00:00+00:00",
      "product_status:known_affected": "246",
      "product_status:known_not_affected": "28",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: sysfs: check visibility before changing group attribute ownership",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40355.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-11T01:53:27Z",
      "cve": "CVE-2025-40355",
      "id": "CVE-2025-40355",
      "initial_release_date": "2025-12-17T00:30:26Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "610",
      "product_status:known_not_affected": "260",
      "product_status:recommended": "289",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40355",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40355.json",
      "version": "36"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…