{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nkprobes: Fix possible use-after-free issue on kprobe registration\n\nWhen unloading a module, its state is changing MODULE_STATE_LIVE ->\n MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take\na time. `is_module_text_address()` and `__module_text_address()`\nworks with MODULE_STATE_LIVE and MODULE_STATE_GOING.\nIf we use `is_module_text_address()` and `__module_text_address()`\nseparately, there is a chance that the first one is succeeded but the\nnext one is failed because module->state becomes MODULE_STATE_UNFORMED\nbetween those operations.\n\nIn `check_kprobe_address_safe()`, if the second `__module_text_address()`\nis failed, that is ignored because it expected a kernel_text address.\nBut it may have failed simply because module->state has been changed\nto MODULE_STATE_UNFORMED. In this case, arm_kprobe() will try to modify\nnon-exist module text address (use-after-free).\n\nTo fix this problem, we should not use separated `is_module_text_address()`\nand `__module_text_address()`, but use only `__module_text_address()`\nonce and do `try_module_get(module)` which is only available with\nMODULE_STATE_LIVE."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "kernel/kprobes.c"
               ],
               "versions": [
                  {
                     "version": "1c836bad43f3",
                     "lessThan": "b5808d400934",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "6a119c1a584a",
                     "lessThan": "93eb31e7c339",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "2a49b025c36a",
                     "lessThan": "5062d1f4f07f",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "a1edb85e60fd",
                     "lessThan": "2df2dd27066c",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "28f6c37a2910",
                     "lessThan": "62029bc9ff2c",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "28f6c37a2910",
                     "lessThan": "d15023fb4073",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "28f6c37a2910",
                     "lessThan": "36b57c7d2f8b",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "28f6c37a2910",
                     "lessThan": "325f3fb551f8",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "kernel/kprobes.c"
               ],
               "versions": [
                  {
                     "version": "6.0",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "6.0",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "4.19.313",
                     "lessThanOrEqual": "4.19.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.4.275",
                     "lessThanOrEqual": "5.4.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.10.216",
                     "lessThanOrEqual": "5.10.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.157",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1.87",
                     "lessThanOrEqual": "6.1.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.6.28",
                     "lessThanOrEqual": "6.6.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.8.7",
                     "lessThanOrEqual": "6.8.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.9",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/b5808d40093403334d939e2c3c417144d12a6f33"
            },
            {
               "url": "https://git.kernel.org/stable/c/93eb31e7c3399e326259f2caa17be1e821f5a412"
            },
            {
               "url": "https://git.kernel.org/stable/c/5062d1f4f07facbdade0f402d9a04a788f52e26d"
            },
            {
               "url": "https://git.kernel.org/stable/c/2df2dd27066cdba8041e46a64362325626bdfb2e"
            },
            {
               "url": "https://git.kernel.org/stable/c/62029bc9ff2c17a4e3a2478d83418ec575413808"
            },
            {
               "url": "https://git.kernel.org/stable/c/d15023fb407337028a654237d8968fefdcf87c2f"
            },
            {
               "url": "https://git.kernel.org/stable/c/36b57c7d2f8b7de224980f1a284432846ad71ca0"
            },
            {
               "url": "https://git.kernel.org/stable/c/325f3fb551f8cd672dbbfc4cf58b14f9ee3fc9e8"
            }
         ],
         "title": "kprobes: Fix possible use-after-free issue on kprobe registration",
         "x_generator": {
            "engine": "bippy-a5840b7849dd"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2024-35955",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
