CVE-2024-26688
Vulnerability from cvelistv5
Published
2024-04-03 14:54
Modified
2024-12-19 08:45
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super When configuring a hugetlb filesystem via the fsconfig() syscall, there is a possible NULL dereference in hugetlbfs_fill_super() caused by assigning NULL to ctx->hstate in hugetlbfs_parse_param() when the requested pagesize is non valid. E.g: Taking the following steps: fd = fsopen("hugetlbfs", FSOPEN_CLOEXEC); fsconfig(fd, FSCONFIG_SET_STRING, "pagesize", "1024", 0); fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); Given that the requested "pagesize" is invalid, ctxt->hstate will be replaced with NULL, losing its previous value, and we will print an error: ... ... case Opt_pagesize: ps = memparse(param->string, &rest); ctx->hstate = h; if (!ctx->hstate) { pr_err("Unsupported page size %lu MB\n", ps / SZ_1M); return -EINVAL; } return 0; ... ... This is a problem because later on, we will dereference ctxt->hstate in hugetlbfs_fill_super() ... ... sb->s_blocksize = huge_page_size(ctx->hstate); ... ... Causing below Oops. Fix this by replacing cxt->hstate value only when then pagesize is known to be valid. kernel: hugetlbfs: Unsupported page size 0 MB kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028 kernel: #PF: supervisor read access in kernel mode kernel: #PF: error_code(0x0000) - not-present page kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0 kernel: Oops: 0000 [#1] PREEMPT SMP PTI kernel: CPU: 4 PID: 5659 Comm: syscall Tainted: G E 6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344aabc35190ae8f kernel: Hardware name: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 05/03/2017 kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0 kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 <8b> 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28 kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246 kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004 kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000 kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004 kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000 kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400 kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0 kernel: Call Trace: kernel: <TASK> kernel: ? __die_body+0x1a/0x60 kernel: ? page_fault_oops+0x16f/0x4a0 kernel: ? search_bpf_extables+0x65/0x70 kernel: ? fixup_exception+0x22/0x310 kernel: ? exc_page_fault+0x69/0x150 kernel: ? asm_exc_page_fault+0x22/0x30 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: ? hugetlbfs_fill_super+0xb4/0x1a0 kernel: ? hugetlbfs_fill_super+0x28/0x1a0 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: vfs_get_super+0x40/0xa0 kernel: ? __pfx_bpf_lsm_capable+0x10/0x10 kernel: vfs_get_tree+0x25/0xd0 kernel: vfs_cmd_create+0x64/0xe0 kernel: __x64_sys_fsconfig+0x395/0x410 kernel: do_syscall_64+0x80/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? exc_page_fault+0x69/0x150 kernel: entry_SYSCALL_64_after_hwframe+0x6e/0x76 kernel: RIP: 0033:0x7ffbc0cb87c9 kernel: Code: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48 kernel: RSP: 002b:00007ffc29d2f388 EFLAGS: 00000206 ORIG_RAX: 00000000000001af kernel: RAX: fffffffffff ---truncated---
References
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39
af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html
Impacted products
Vendor Product Version
Linux Linux Version: 5.1
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:14:12.699Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26688",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:53:03.970404Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:32.587Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/hugetlbfs/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1dde8ef4b7a749ae1bc73617c91775631d167557",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "80d852299987a8037be145a94f41874228f1a773",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "22850c9950a4e43a67299755d11498f3292d02ff",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "2e2c07104b4904aed1389a59b25799b95a85b5b9",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "13c5a9fb07105557a1fa9efdb4f23d7ef30b7274",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "ec78418801ef7b0c22cd6a30145ec480dd48db39",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            },
            {
              "lessThan": "79d72c68c58784a3e1cd2378669d51bfd0cb7498",
              "status": "affected",
              "version": "32021982a324dce93b4ae00c06213bf45fb319c8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/hugetlbfs/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.1"
            },
            {
              "lessThan": "5.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.271",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.212",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.151",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.79",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.8",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super\n\nWhen configuring a hugetlb filesystem via the fsconfig() syscall, there is\na possible NULL dereference in hugetlbfs_fill_super() caused by assigning\nNULL to ctx-\u003ehstate in hugetlbfs_parse_param() when the requested pagesize\nis non valid.\n\nE.g: Taking the following steps:\n\n     fd = fsopen(\"hugetlbfs\", FSOPEN_CLOEXEC);\n     fsconfig(fd, FSCONFIG_SET_STRING, \"pagesize\", \"1024\", 0);\n     fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0);\n\nGiven that the requested \"pagesize\" is invalid, ctxt-\u003ehstate will be replaced\nwith NULL, losing its previous value, and we will print an error:\n\n ...\n ...\n case Opt_pagesize:\n ps = memparse(param-\u003estring, \u0026rest);\n ctx-\u003ehstate = h;\n if (!ctx-\u003ehstate) {\n         pr_err(\"Unsupported page size %lu MB\\n\", ps / SZ_1M);\n         return -EINVAL;\n }\n return 0;\n ...\n ...\n\nThis is a problem because later on, we will dereference ctxt-\u003ehstate in\nhugetlbfs_fill_super()\n\n ...\n ...\n sb-\u003es_blocksize = huge_page_size(ctx-\u003ehstate);\n ...\n ...\n\nCausing below Oops.\n\nFix this by replacing cxt-\u003ehstate value only when then pagesize is known\nto be valid.\n\n kernel: hugetlbfs: Unsupported page size 0 MB\n kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028\n kernel: #PF: supervisor read access in kernel mode\n kernel: #PF: error_code(0x0000) - not-present page\n kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0\n kernel: Oops: 0000 [#1] PREEMPT SMP PTI\n kernel: CPU: 4 PID: 5659 Comm: syscall Tainted: G            E      6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344aabc35190ae8f\n kernel: Hardware name: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 05/03/2017\n kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0\n kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 \u003c8b\u003e 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28\n kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246\n kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004\n kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000\n kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004\n kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000\n kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400\n kernel: FS:  00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000\n kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0\n kernel: Call Trace:\n kernel:  \u003cTASK\u003e\n kernel:  ? __die_body+0x1a/0x60\n kernel:  ? page_fault_oops+0x16f/0x4a0\n kernel:  ? search_bpf_extables+0x65/0x70\n kernel:  ? fixup_exception+0x22/0x310\n kernel:  ? exc_page_fault+0x69/0x150\n kernel:  ? asm_exc_page_fault+0x22/0x30\n kernel:  ? __pfx_hugetlbfs_fill_super+0x10/0x10\n kernel:  ? hugetlbfs_fill_super+0xb4/0x1a0\n kernel:  ? hugetlbfs_fill_super+0x28/0x1a0\n kernel:  ? __pfx_hugetlbfs_fill_super+0x10/0x10\n kernel:  vfs_get_super+0x40/0xa0\n kernel:  ? __pfx_bpf_lsm_capable+0x10/0x10\n kernel:  vfs_get_tree+0x25/0xd0\n kernel:  vfs_cmd_create+0x64/0xe0\n kernel:  __x64_sys_fsconfig+0x395/0x410\n kernel:  do_syscall_64+0x80/0x160\n kernel:  ? syscall_exit_to_user_mode+0x82/0x240\n kernel:  ? do_syscall_64+0x8d/0x160\n kernel:  ? syscall_exit_to_user_mode+0x82/0x240\n kernel:  ? do_syscall_64+0x8d/0x160\n kernel:  ? exc_page_fault+0x69/0x150\n kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0x76\n kernel: RIP: 0033:0x7ffbc0cb87c9\n kernel: Code: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \u003c48\u003e 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48\n kernel: RSP: 002b:00007ffc29d2f388 EFLAGS: 00000206 ORIG_RAX: 00000000000001af\n kernel: RAX: fffffffffff\n---truncated---"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T08:45:07.332Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557"
        },
        {
          "url": "https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773"
        },
        {
          "url": "https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff"
        },
        {
          "url": "https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9"
        },
        {
          "url": "https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274"
        },
        {
          "url": "https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39"
        },
        {
          "url": "https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498"
        }
      ],
      "title": "fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26688",
    "datePublished": "2024-04-03T14:54:49.964Z",
    "dateReserved": "2024-02-19T14:20:24.154Z",
    "dateUpdated": "2024-12-19T08:45:07.332Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-26688\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-03T15:15:52.370\",\"lastModified\":\"2024-11-21T09:02:50.947\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nfs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super\\n\\nWhen configuring a hugetlb filesystem via the fsconfig() syscall, there is\\na possible NULL dereference in hugetlbfs_fill_super() caused by assigning\\nNULL to ctx-\u003ehstate in hugetlbfs_parse_param() when the requested pagesize\\nis non valid.\\n\\nE.g: Taking the following steps:\\n\\n     fd = fsopen(\\\"hugetlbfs\\\", FSOPEN_CLOEXEC);\\n     fsconfig(fd, FSCONFIG_SET_STRING, \\\"pagesize\\\", \\\"1024\\\", 0);\\n     fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0);\\n\\nGiven that the requested \\\"pagesize\\\" is invalid, ctxt-\u003ehstate will be replaced\\nwith NULL, losing its previous value, and we will print an error:\\n\\n ...\\n ...\\n case Opt_pagesize:\\n ps = memparse(param-\u003estring, \u0026rest);\\n ctx-\u003ehstate = h;\\n if (!ctx-\u003ehstate) {\\n         pr_err(\\\"Unsupported page size %lu MB\\\\n\\\", ps / SZ_1M);\\n         return -EINVAL;\\n }\\n return 0;\\n ...\\n ...\\n\\nThis is a problem because later on, we will dereference ctxt-\u003ehstate in\\nhugetlbfs_fill_super()\\n\\n ...\\n ...\\n sb-\u003es_blocksize = huge_page_size(ctx-\u003ehstate);\\n ...\\n ...\\n\\nCausing below Oops.\\n\\nFix this by replacing cxt-\u003ehstate value only when then pagesize is known\\nto be valid.\\n\\n kernel: hugetlbfs: Unsupported page size 0 MB\\n kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028\\n kernel: #PF: supervisor read access in kernel mode\\n kernel: #PF: error_code(0x0000) - not-present page\\n kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0\\n kernel: Oops: 0000 [#1] PREEMPT SMP PTI\\n kernel: CPU: 4 PID: 5659 Comm: syscall Tainted: G            E      6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344aabc35190ae8f\\n kernel: Hardware name: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 05/03/2017\\n kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0\\n kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 \u003c8b\u003e 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28\\n kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246\\n kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004\\n kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000\\n kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004\\n kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000\\n kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400\\n kernel: FS:  00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000\\n kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\\n kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0\\n kernel: Call Trace:\\n kernel:  \u003cTASK\u003e\\n kernel:  ? __die_body+0x1a/0x60\\n kernel:  ? page_fault_oops+0x16f/0x4a0\\n kernel:  ? search_bpf_extables+0x65/0x70\\n kernel:  ? fixup_exception+0x22/0x310\\n kernel:  ? exc_page_fault+0x69/0x150\\n kernel:  ? asm_exc_page_fault+0x22/0x30\\n kernel:  ? __pfx_hugetlbfs_fill_super+0x10/0x10\\n kernel:  ? hugetlbfs_fill_super+0xb4/0x1a0\\n kernel:  ? hugetlbfs_fill_super+0x28/0x1a0\\n kernel:  ? __pfx_hugetlbfs_fill_super+0x10/0x10\\n kernel:  vfs_get_super+0x40/0xa0\\n kernel:  ? __pfx_bpf_lsm_capable+0x10/0x10\\n kernel:  vfs_get_tree+0x25/0xd0\\n kernel:  vfs_cmd_create+0x64/0xe0\\n kernel:  __x64_sys_fsconfig+0x395/0x410\\n kernel:  do_syscall_64+0x80/0x160\\n kernel:  ? syscall_exit_to_user_mode+0x82/0x240\\n kernel:  ? do_syscall_64+0x8d/0x160\\n kernel:  ? syscall_exit_to_user_mode+0x82/0x240\\n kernel:  ? do_syscall_64+0x8d/0x160\\n kernel:  ? exc_page_fault+0x69/0x150\\n kernel:  entry_SYSCALL_64_after_hwframe+0x6e/0x76\\n kernel: RIP: 0033:0x7ffbc0cb87c9\\n kernel: Code: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \u003c48\u003e 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48\\n kernel: RSP: 002b:00007ffc29d2f388 EFLAGS: 00000206 ORIG_RAX: 00000000000001af\\n kernel: RAX: fffffffffff\\n---truncated---\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: fs,hugetlb: corrige la desreferencia del puntero NULL en hugetlbs_fill_super Al configurar un SYSTEM de archivos de Hugetlb a trav\u00e9s de la llamada al SYSTEM fsconfig(), existe una posible desreferencia de NULL en hugetlbfs_fill_super() causada por la asignaci\u00f3n de NULL a ctx. -\u0026gt;hstate en hugetlbfs_parse_param() cuando el tama\u00f1o de p\u00e1gina solicitado no es v\u00e1lido. Por ejemplo: siguiendo los siguientes pasos: fd = fsopen(\\\"hugetlbfs\\\", FSOPEN_CLOEXEC); fsconfig(fd, FSCONFIG_SET_STRING, \\\"tama\u00f1o de p\u00e1gina\\\", \\\"1024\\\", 0); fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); Dado que el \\\"tama\u00f1o de p\u00e1gina\\\" solicitado no es v\u00e1lido, ctxt-\u0026gt;hstate ser\u00e1 reemplazado por NULL, perdiendo su valor anterior, e imprimiremos un error: ... ... case Opt_pagesize: ps = memparse(param-\u0026gt;string, \u0026amp;descansar); ctx-\u0026gt;hestado = h; if (!ctx-\u0026gt;hstate) { pr_err(\\\"Tama\u00f1o de p\u00e1gina no admitido %lu MB\\\\n\\\", ps / SZ_1M); devolver -EINVAL; } devolver 0; ... ... Esto es un problema porque m\u00e1s adelante eliminaremos la referencia a ctxt-\u0026gt;hstate en hugetlbfs_fill_super() ... ... sb-\u0026gt;s_blocksize = huge_page_size(ctx-\u0026gt;hstate); ... ... Causando debajo Ups. Solucione este problema reemplazando el valor cxt-\u0026gt;hstate solo cuando se sepa que el tama\u00f1o de p\u00e1gina es v\u00e1lido. kernel: hugetlbfs: Tama\u00f1o de p\u00e1gina no admitido 0 MB kernel: ERROR: desreferencia del puntero NULL del kernel, direcci\u00f3n: 0000000000000028 kernel: #PF: acceso de lectura del supervisor en modo kernel kernel: #PF: c\u00f3digo_error(0x0000) - p\u00e1gina no presente kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0 kernel: Ups: 0000 [#1] PREEMPT SMP PTI kernel: CPU: 4 PID: 5659 Comm: syscall Contaminado: GE 6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344 Kernel aabc35190ae8f: Nombre del hardware: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 03/05/2017 kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0 kernel: C\u00f3digo: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 \u0026lt;8b\u0026gt; 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28 kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246 kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004 kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff R DI: ffff9af555e9b000 kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004 kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000 kernel: R13: fffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400 kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7 000000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0 kernel: Seguimiento de llamadas: kernel:  kernel: ? __die_body+0x1a/0x60 n\u00facleo: ? page_fault_oops+0x16f/0x4a0 n\u00facleo:? search_bpf_extables+0x65/0x70 n\u00facleo:? fixup_exception+0x22/0x310 kernel:? exc_page_fault+0x69/0x150 n\u00facleo:? asm_exc_page_fault+0x22/0x30 n\u00facleo:? __pfx_hugetlbfs_fill_super+0x10/0x10 n\u00facleo:? n\u00facleo enormetlbfs_fill_super+0xb4/0x1a0:? enormetlbfs_fill_super+0x28/0x1a0 kernel:? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: vfs_get_super+0x40/0xa0 kernel:? __pfx_bpf_lsm_capable+0x10/0x10 kernel: vfs_get_tree+0x25/0xd0 kernel: vfs_cmd_create+0x64/0xe0 kernel: __x64_sys_fsconfig+0x395/0x410 kernel: do_syscall_64+0x80/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel:? do_syscall_64+0x8d/0x160 n\u00facleo:? syscall_exit_to_user_mode+0x82/0x240 kernel:? do_syscall_64+0x8d/0x160 n\u00facleo:? exc_page_fault+0x69/0x150 kernel: Entry_SYSCALL_64_after_hwframe+0x6e/0x76 kernel: RIP: 0033:0x7ffbc0cb87c9 kernel: C\u00f3digo: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \u0026lt;48\u0026gt; 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48 ---truncado---\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/13c5a9fb07105557a1fa9efdb4f23d7ef30b7274\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/1dde8ef4b7a749ae1bc73617c91775631d167557\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/22850c9950a4e43a67299755d11498f3292d02ff\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/2e2c07104b4904aed1389a59b25799b95a85b5b9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/79d72c68c58784a3e1cd2378669d51bfd0cb7498\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/80d852299987a8037be145a94f41874228f1a773\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/ec78418801ef7b0c22cd6a30145ec480dd48db39\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


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.