{"id":"CVE-2024-58060","aliases":["CVE-2024-58060"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing\n\nThere is a UAF report in the bpf_struct_ops when CONFIG_MODULES=n.\nIn particular, the report is on tcp_congestion_ops that has\na \"struct module *owner\" member.\n\nFor struct_ops that has a \"struct module *owner\" member,\nit can be extended either by the regular kernel module or\nby the bpf_struct_ops. bpf_try_module_get() will be used\nto do the refcounting and different refcount is done\nbased on the owner pointer. When CONFIG_MODULES=n,\nthe btf_id of the \"struct module\" is missing:\n\nWARN: resolve_btfids: unresolved symbol module\n\nThus, the bpf_try_module_get() cannot do the correct refcounting.\n\nNot all subsystem's struct_ops requires the \"struct module *owner\" member.\ne.g. the recent sched_ext_ops.\n\nThis patch is to disable bpf_struct_ops registration if\nthe struct_ops has the \"struct module *\" member and the\n\"struct module\" btf_id is missing. The btf_type_is_fwd() helper\nis moved to the btf.h header file for this test.\n\nThis has happened since the beginning of bpf_struct_ops which has gone\nthrough many changes. The Fixes tag is set to a recent commit that this\npatch can apply cleanly. Considering CONFIG_MODULES=n is not\ncommon and the age of the issue, targeting for bpf-next also.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing\n\nThere is a UAF report in the bpf_struct_ops when CONFIG_MODULES=n.\nIn particular, the report is on tcp_congestion_ops that has\na \"struct module *owner\" member.\n\nFor struct_ops that has a \"struct module *owner\" member,\nit can be extended either by the regular kernel module or\nby the bpf_struct_ops. bpf_try_module_get() will be used\nto do the refcounting and different refcount is done\nbased on the owner pointer. When CONFIG_MODULES=n,\nthe btf_id of the \"struct module\" is missing:\n\nWARN: resolve_btfids: unresolved symbol module\n\nThus, the bpf_try_module_get() cannot do the correct refcounting.\n\nNot all subsystem's struct_ops requires the \"struct module *owner\" member.\ne.g. the recent sched_ext_ops.\n\nThis patch is to disable bpf_struct_ops registration if\nthe struct_ops has the \"struct module *\" member and the\n\"struct module\" btf_id is missing. The btf_type_is_fwd() helper\nis moved to the btf.h header file for this test.\n\nThis has happened since the beginning of bpf_struct_ops which has gone\nthrough many changes. The Fixes tag is set to a recent commit that this\npatch can apply cleanly. Considering CONFIG_MODULES=n is not\ncommon and the age of the issue, targeting for bpf-next also.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Rechazar el registro de struct_ops que usa el módulo ptr y falta el módulo btf_id Hay un informe UAF en bpf_struct_ops cuando CONFIG_MODULES=n. En particular, el informe está en tcp_congestion_ops que tiene un miembro \"struct module *owner\". Para struct_ops que tiene un miembro \"struct module *owner\", puede extenderse mediante el módulo de kernel regular o mediante bpf_struct_ops. bpf_try_module_get() se usará para hacer el recuento de referencias y se realiza un recuento de referencias diferente según el puntero del propietario. Cuando CONFIG_MODULES=n, falta el btf_id del \"struct module\": WARN: resolve_btfids: módulo de símbolo sin resolver Por lo tanto, bpf_try_module_get() no puede hacer el recuento de referencias correcto. No todos los struct_ops de los subsistemas requieren el miembro \"struct module *owner\", por ejemplo, el reciente sched_ext_ops. Este parche sirve para deshabilitar el registro de bpf_struct_ops si struct_ops tiene el miembro \"struct module *\" y falta el btf_id \"struct module\". El asistente btf_type_is_fwd() se ha movido al archivo de encabezado btf.h para esta prueba. Esto ha sucedido desde el comienzo de bpf_struct_ops, que ha sufrido muchos cambios. La etiqueta Fixes se establece en una confirmación reciente que este parche puede aplicar sin problemas. Teniendo en cuenta que CONFIG_MODULES=n no es común y la antigüedad del problema, también se apunta a bpf-next.","source":"nvd"}],"published":"2025-03-06T15:54:03.253Z","modified":"2026-08-05T11:47:30.918Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"1611603537a4b88cec7993f32b70c03113801a46","fixed":"b777b14c2a4a4e2322daf8e8ffd42d2b88831b17","status":"affected"},{"type":"git","introduced":"1611603537a4b88cec7993f32b70c03113801a46","fixed":"2324fb4e92092837ee278fdd8d60c48ee1a619ce","status":"affected"},{"type":"git","introduced":"1611603537a4b88cec7993f32b70c03113801a46","fixed":"96ea081ed52bf077cad6d00153b6fba68e510767","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.9","status":"unaffected"},{"type":"semver","introduced":"6.12.13","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.2","lastAffected":"6.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.14","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.9","fixed":"6.12.13"},{"status":"affected","introduced":"6.13","fixed":"6.13.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b777b14c2a4a4e2322daf8e8ffd42d2b88831b17","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2324fb4e92092837ee278fdd8d60c48ee1a619ce","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/96ea081ed52bf077cad6d00153b6fba68e510767","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-03-06T16:04:02.766Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-58060","url":"https://www.cve.org/CVERecord?id=CVE-2024-58060","licence":"CVE Terms of Use","modified":"2026-08-05T11:47:30.918Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-58060","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58060","licence":"Public domain","modified":"2026-06-17T08:14:32.227Z"}],"updatedAt":"2026-11-25T22:58:52.212Z","epss":{"score":0.00205,"percentile":0.11076,"date":"2026-12-01T12:00:22.000Z"}}