cve-2024-26703
Vulnerability from cvelistv5
Published
2024-04-03 14:55
Modified
2024-08-02 00:14
Severity
Summary
tracing/timerlat: Move hrtimer_init to timerlat_fd open()
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26703",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-04-05T18:03:40.350570Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:49:26.798Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:14:12.874Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/5f703935fdb559642d85b2088442ee55a557ae6d"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2354d29986ebd138f89c2b73fecf8237e0a4ad6b"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1389358bb008e7625942846e9f03554319b7fecc"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/trace_osnoise.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5f703935fdb5",
              "status": "affected",
              "version": "e88ed227f639",
              "versionType": "git"
            },
            {
              "lessThan": "2354d29986eb",
              "status": "affected",
              "version": "e88ed227f639",
              "versionType": "git"
            },
            {
              "lessThan": "1389358bb008",
              "status": "affected",
              "version": "e88ed227f639",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/trace_osnoise.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.5"
            },
            {
              "lessThan": "6.5",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.18",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.6",
              "versionType": "custom"
            },
            {
              "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\ntracing/timerlat: Move hrtimer_init to timerlat_fd open()\n\nCurrently, the timerlat\u0027s hrtimer is initialized at the first read of\ntimerlat_fd, and destroyed at close(). It works, but it causes an error\nif the user program open() and close() the file without reading.\n\nHere\u0027s an example:\n\n # echo NO_OSNOISE_WORKLOAD \u003e /sys/kernel/debug/tracing/osnoise/options\n # echo timerlat \u003e /sys/kernel/debug/tracing/current_tracer\n\n # cat \u003c\u003cEOF \u003e ./timerlat_load.py\n # !/usr/bin/env python3\n\n timerlat_fd = open(\"/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd\", \u0027r\u0027)\n timerlat_fd.close();\n EOF\n\n # ./taskset -c 0 ./timerlat_load.py\n\u003cBOOM\u003e\n\n BUG: kernel NULL pointer dereference, address: 0000000000000010\n #PF: supervisor read access in kernel mode\n #PF: error_code(0x0000) - not-present page\n PGD 0 P4D 0\n Oops: 0000 [#1] PREEMPT SMP NOPTI\n CPU: 1 PID: 2673 Comm: python3 Not tainted 6.6.13-200.fc39.x86_64 #1\n Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014\n RIP: 0010:hrtimer_active+0xd/0x50\n Code: 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 48 8b 57 30 \u003c8b\u003e 42 10 a8 01 74 09 f3 90 8b 42 10 a8 01 75 f7 80 7f 38 00 75 1d\n RSP: 0018:ffffb031009b7e10 EFLAGS: 00010286\n RAX: 000000000002db00 RBX: ffff9118f786db08 RCX: 0000000000000000\n RDX: 0000000000000000 RSI: ffff9117a0e64400 RDI: ffff9118f786db08\n RBP: ffff9118f786db80 R08: ffff9117a0ddd420 R09: ffff9117804d4f70\n R10: 0000000000000000 R11: 0000000000000000 R12: ffff9118f786db08\n R13: ffff91178fdd5e20 R14: ffff9117840978c0 R15: 0000000000000000\n FS:  00007f2ffbab1740(0000) GS:ffff9118f7840000(0000) knlGS:0000000000000000\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n CR2: 0000000000000010 CR3: 00000001b402e000 CR4: 0000000000750ee0\n PKRU: 55555554\n Call Trace:\n  \u003cTASK\u003e\n  ? __die+0x23/0x70\n  ? page_fault_oops+0x171/0x4e0\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? avc_has_extended_perms+0x237/0x520\n  ? exc_page_fault+0x7f/0x180\n  ? asm_exc_page_fault+0x26/0x30\n  ? hrtimer_active+0xd/0x50\n  hrtimer_cancel+0x15/0x40\n  timerlat_fd_release+0x48/0xe0\n  __fput+0xf5/0x290\n  __x64_sys_close+0x3d/0x80\n  do_syscall_64+0x60/0x90\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? __x64_sys_ioctl+0x72/0xd0\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? syscall_exit_to_user_mode+0x2b/0x40\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? do_syscall_64+0x6c/0x90\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? exit_to_user_mode_prepare+0x142/0x1f0\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? syscall_exit_to_user_mode+0x2b/0x40\n  ? srso_alias_return_thunk+0x5/0x7f\n  ? do_syscall_64+0x6c/0x90\n  entry_SYSCALL_64_after_hwframe+0x6e/0xd8\n RIP: 0033:0x7f2ffb321594\n Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 80 3d d5 cd 0d 00 00 74 13 b8 03 00 00 00 0f 05 \u003c48\u003e 3d 00 f0 ff ff 77 3c c3 0f 1f 00 55 48 89 e5 48 83 ec 10 89 7d\n RSP: 002b:00007ffe8d8eef18 EFLAGS: 00000202 ORIG_RAX: 0000000000000003\n RAX: ffffffffffffffda RBX: 00007f2ffba4e668 RCX: 00007f2ffb321594\n RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003\n RBP: 00007ffe8d8eef40 R08: 0000000000000000 R09: 0000000000000000\n R10: 55c926e3167eae79 R11: 0000000000000202 R12: 0000000000000003\n R13: 00007ffe8d8ef030 R14: 0000000000000000 R15: 00007f2ffba4e668\n  \u003c/TASK\u003e\n CR2: 0000000000000010\n ---[ end trace 0000000000000000 ]---\n\nMove hrtimer_init to timerlat_fd open() to avoid this problem."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:21:09.362Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5f703935fdb559642d85b2088442ee55a557ae6d"
        },
        {
          "url": "https://git.kernel.org/stable/c/2354d29986ebd138f89c2b73fecf8237e0a4ad6b"
        },
        {
          "url": "https://git.kernel.org/stable/c/1389358bb008e7625942846e9f03554319b7fecc"
        }
      ],
      "title": "tracing/timerlat: Move hrtimer_init to timerlat_fd open()",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26703",
    "datePublished": "2024-04-03T14:55:01.838Z",
    "dateReserved": "2024-02-19T14:20:24.158Z",
    "dateUpdated": "2024-08-02T00:14:12.874Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-26703\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-03T15:15:53.140\",\"lastModified\":\"2024-04-03T17:24:18.150\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ntracing/timerlat: Move hrtimer_init to timerlat_fd open()\\n\\nCurrently, the timerlat\u0027s hrtimer is initialized at the first read of\\ntimerlat_fd, and destroyed at close(). It works, but it causes an error\\nif the user program open() and close() the file without reading.\\n\\nHere\u0027s an example:\\n\\n # echo NO_OSNOISE_WORKLOAD \u003e /sys/kernel/debug/tracing/osnoise/options\\n # echo timerlat \u003e /sys/kernel/debug/tracing/current_tracer\\n\\n # cat \u003c\u003cEOF \u003e ./timerlat_load.py\\n # !/usr/bin/env python3\\n\\n timerlat_fd = open(\\\"/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd\\\", \u0027r\u0027)\\n timerlat_fd.close();\\n EOF\\n\\n # ./taskset -c 0 ./timerlat_load.py\\n\u003cBOOM\u003e\\n\\n BUG: kernel NULL pointer dereference, address: 0000000000000010\\n #PF: supervisor read access in kernel mode\\n #PF: error_code(0x0000) - not-present page\\n PGD 0 P4D 0\\n Oops: 0000 [#1] PREEMPT SMP NOPTI\\n CPU: 1 PID: 2673 Comm: python3 Not tainted 6.6.13-200.fc39.x86_64 #1\\n Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014\\n RIP: 0010:hrtimer_active+0xd/0x50\\n Code: 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 48 8b 57 30 \u003c8b\u003e 42 10 a8 01 74 09 f3 90 8b 42 10 a8 01 75 f7 80 7f 38 00 75 1d\\n RSP: 0018:ffffb031009b7e10 EFLAGS: 00010286\\n RAX: 000000000002db00 RBX: ffff9118f786db08 RCX: 0000000000000000\\n RDX: 0000000000000000 RSI: ffff9117a0e64400 RDI: ffff9118f786db08\\n RBP: ffff9118f786db80 R08: ffff9117a0ddd420 R09: ffff9117804d4f70\\n R10: 0000000000000000 R11: 0000000000000000 R12: ffff9118f786db08\\n R13: ffff91178fdd5e20 R14: ffff9117840978c0 R15: 0000000000000000\\n FS:  00007f2ffbab1740(0000) GS:ffff9118f7840000(0000) knlGS:0000000000000000\\n CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\\n CR2: 0000000000000010 CR3: 00000001b402e000 CR4: 0000000000750ee0\\n PKRU: 55555554\\n Call Trace:\\n  \u003cTASK\u003e\\n  ? __die+0x23/0x70\\n  ? page_fault_oops+0x171/0x4e0\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? avc_has_extended_perms+0x237/0x520\\n  ? exc_page_fault+0x7f/0x180\\n  ? asm_exc_page_fault+0x26/0x30\\n  ? hrtimer_active+0xd/0x50\\n  hrtimer_cancel+0x15/0x40\\n  timerlat_fd_release+0x48/0xe0\\n  __fput+0xf5/0x290\\n  __x64_sys_close+0x3d/0x80\\n  do_syscall_64+0x60/0x90\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? __x64_sys_ioctl+0x72/0xd0\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? syscall_exit_to_user_mode+0x2b/0x40\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? do_syscall_64+0x6c/0x90\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? exit_to_user_mode_prepare+0x142/0x1f0\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? syscall_exit_to_user_mode+0x2b/0x40\\n  ? srso_alias_return_thunk+0x5/0x7f\\n  ? do_syscall_64+0x6c/0x90\\n  entry_SYSCALL_64_after_hwframe+0x6e/0xd8\\n RIP: 0033:0x7f2ffb321594\\n Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 80 3d d5 cd 0d 00 00 74 13 b8 03 00 00 00 0f 05 \u003c48\u003e 3d 00 f0 ff ff 77 3c c3 0f 1f 00 55 48 89 e5 48 83 ec 10 89 7d\\n RSP: 002b:00007ffe8d8eef18 EFLAGS: 00000202 ORIG_RAX: 0000000000000003\\n RAX: ffffffffffffffda RBX: 00007f2ffba4e668 RCX: 00007f2ffb321594\\n RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003\\n RBP: 00007ffe8d8eef40 R08: 0000000000000000 R09: 0000000000000000\\n R10: 55c926e3167eae79 R11: 0000000000000202 R12: 0000000000000003\\n R13: 00007ffe8d8ef030 R14: 0000000000000000 R15: 00007f2ffba4e668\\n  \u003c/TASK\u003e\\n CR2: 0000000000000010\\n ---[ end trace 0000000000000000 ]---\\n\\nMove hrtimer_init to timerlat_fd open() to avoid this problem.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: tracing/timerlat: mover hrtimer_init a timerlat_fd open() Actualmente, el hrtimer de timerlat se inicializa en la primera lectura de timerlat_fd y se destruye al cerrar(). Funciona, pero causa un error si el programa de usuario abre() y cierra() el archivo sin leerlo. Aqu\u00ed hay un ejemplo: # echo NO_OSNOISE_WORKLOAD \u0026gt; /sys/kernel/debug/tracing/osnoise/options # echo timerlat \u0026gt; /sys/kernel/debug/tracing/current_tracer # cat \u0026lt; ./timerlat_load.py # !/usr/ bin/env python3 timerlat_fd = open(\\\"/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd\\\", \u0027r\u0027) timerlat_fd.close(); EOF # ./taskset -c 0 ./timerlat_load.py  ERROR: desreferencia del puntero NULL del kernel, direcci\u00f3n: 0000000000000010 #PF: acceso de lectura del supervisor en modo kernel #PF: c\u00f3digo_de error(0x0000) - p\u00e1gina no presente PGD 0 P4D 0 Ups: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 2673 Comm: python3 No contaminado 6.6.13-200.fc39.x86_64 #1 Nombre del hardware: PC est\u00e1ndar QEMU (Q35 + ICH9, 2009), BIOS 1.16. 3-1.fc39 01/04/2014 RIP: 0010:hrtimer_active+0xd/0x50 C\u00f3digo: 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 48 8b 57 30 \u0026lt;8b\u0026gt; 42 10 a8 01 74 09 f3 90 8b 42 10 a8 01 75 f7 80 7f 38 00 75 1d RSP: 0018:ffffb031009b7e10 EF LAGS: 00010286 RAX: 000000000002db00 RBX: ffff9118f786db08 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff9117a0e64400 RDI: ffff9118f786db08 RBP: ffff9118f786db80 R08: ffff9117a0ddd42 0 R09: ffff9117804d4f70 R10: 0000000000000000 R11: 0000000000000000 R12: ffff9118f786db08 R13: ffff91178fdd5e20 R14: ffff9117840978c0 R15: 000 0000000000000 FS: 00007f2ffbab1740(0000) GS:ffff9118f7840000( 0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000010 CR3: 00000001b402e000 CR4: 000000000075 0ee0 PKRU: 55555554 Seguimiento de llamadas:  ? __morir+0x23/0x70 ? page_fault_oops+0x171/0x4e0? srso_alias_return_thunk+0x5/0x7f? avc_has_extended_perms+0x237/0x520? exc_page_fault+0x7f/0x180? asm_exc_page_fault+0x26/0x30? hrtimer_active+0xd/0x50 hrtimer_cancel+0x15/0x40 timerlat_fd_release+0x48/0xe0 __fput+0xf5/0x290 __x64_sys_close+0x3d/0x80 do_syscall_64+0x60/0x90 ? srso_alias_return_thunk+0x5/0x7f? __x64_sys_ioctl+0x72/0xd0? srso_alias_return_thunk+0x5/0x7f? syscall_exit_to_user_mode+0x2b/0x40? srso_alias_return_thunk+0x5/0x7f? do_syscall_64+0x6c/0x90? srso_alias_return_thunk+0x5/0x7f? exit_to_user_mode_prepare+0x142/0x1f0? srso_alias_return_thunk+0x5/0x7f? syscall_exit_to_user_mode+0x2b/0x40? srso_alias_return_thunk+0x5/0x7f? do_syscall_64+0x6c/0x90 Entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f2ffb321594 C\u00f3digo: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 0 0 90 f3 0f 1e fa 80 3d d5 cd 0d 00 00 74 13 b8 03 00 00 00 0f 05 \u0026lt;48\u0026gt; 3d 00 f0 ff ff 77 3c c3 0f 1f 00 55 48 89 e5 48 83 ec 10 89 7d RSP: 002b:00007ffe8d8eef18 EFLAGS: 00000202 O IG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 00007f2ffba4e668 RCX: 00007f2ffb321594 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ffe8d8eef40 R08: 0000000000000000 R09: 0 000000000000000 R10: 55c926e3167eae79 R11: 0000000000000202 R12: 0000000000000003 R13: 00007ffe8d8ef030 R14: 0000000000000000 R15: 0000 7f2ffba4e668  CR2: 0000000000000010 ---[ end trace 0000000000000000 ]--- Mueva hrtimer_init a timerlat_fd open() para evitar este problema.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1389358bb008e7625942846e9f03554319b7fecc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2354d29986ebd138f89c2b73fecf8237e0a4ad6b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5f703935fdb559642d85b2088442ee55a557ae6d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...