ghsa-gv29-5jrh-hrxg
Vulnerability from github
Published
2024-04-17 12:32
Modified
2024-04-17 12:32
Details

In the Linux kernel, the following vulnerability has been resolved:

fs: relax mount_setattr() permission checks

When we added mount_setattr() I added additional checks compared to the legacy do_reconfigure_mnt() and do_change_type() helpers used by regular mount(2). If that mount had a parent then verify that the caller and the mount namespace the mount is attached to match and if not make sure that it's an anonymous mount.

The real rootfs falls into neither category. It is neither an anoymous mount because it is obviously attached to the initial mount namespace but it also obviously doesn't have a parent mount. So that means legacy mount(2) allows changing mount properties on the real rootfs but mount_setattr(2) blocks this. I never thought much about this but of course someone on this planet of earth changes properties on the real rootfs as can be seen in [1].

Since util-linux finally switched to the new mount api in 2.39 not so long ago it also relies on mount_setattr() and that surfaced this issue when Fedora 39 finally switched to it. Fix this.

Show details on source website


{
  "affected": [],
  "aliases": [
    "CVE-2024-26821"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-04-17T10:15:08Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs: relax mount_setattr() permission checks\n\nWhen we added mount_setattr() I added additional checks compared to the\nlegacy do_reconfigure_mnt() and do_change_type() helpers used by regular\nmount(2). If that mount had a parent then verify that the caller and the\nmount namespace the mount is attached to match and if not make sure that\nit\u0027s an anonymous mount.\n\nThe real rootfs falls into neither category. It is neither an anoymous\nmount because it is obviously attached to the initial mount namespace\nbut it also obviously doesn\u0027t have a parent mount. So that means legacy\nmount(2) allows changing mount properties on the real rootfs but\nmount_setattr(2) blocks this. I never thought much about this but of\ncourse someone on this planet of earth changes properties on the real\nrootfs as can be seen in [1].\n\nSince util-linux finally switched to the new mount api in 2.39 not so\nlong ago it also relies on mount_setattr() and that surfaced this issue\nwhen Fedora 39 finally switched to it. Fix this.",
  "id": "GHSA-gv29-5jrh-hrxg",
  "modified": "2024-04-17T12:32:02Z",
  "published": "2024-04-17T12:32:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-26821"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2a7a31e1fb9717845d9d5e2a8c6e48848147801e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/31f71f2d7a081fc6c6bdf06865beedf6db5b0ca4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/46f5ab762d048dad224436978315cbc2fa79c630"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/95de4ad173ca0e61034f3145d66917970961c210"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.