{"id":"CVE-2026-53095","aliases":["CVE-2026-53095"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix abuse of kprobe_write_ctx via freplace","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix abuse of kprobe_write_ctx via freplace\n\nuprobe programs are allowed to modify struct pt_regs.\n\nSince the actual program type of uprobe is KPROBE, it can be abused to\nmodify struct pt_regs via kprobe+freplace when the kprobe attaches to\nkernel functions.\n\nFor example,\n\nSEC(\"?kprobe\")\nint kprobe(struct pt_regs *regs)\n{\n\treturn 0;\n}\n\nSEC(\"?freplace\")\nint freplace_kprobe(struct pt_regs *regs)\n{\n\tregs->di = 0;\n\treturn 0;\n}\n\nfreplace_kprobe prog will attach to kprobe prog.\nkprobe prog will attach to a kernel function.\n\nWithout this patch, when the kernel function runs, its first arg will\nalways be set as 0 via the freplace_kprobe prog.\n\nTo fix the abuse of kprobe_write_ctx=true via kprobe+freplace, disallow\nattaching freplace programs on kprobe programs with different\nkprobe_write_ctx values.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix abuse of kprobe_write_ctx via freplace\n\nuprobe programs are allowed to modify struct pt_regs.\n\nSince the actual program type of uprobe is KPROBE, it can be abused to\nmodify struct pt_regs via kprobe+freplace when the kprobe attaches to\nkernel functions.\n\nFor example,\n\nSEC(\"?kprobe\")\nint kprobe(struct pt_regs *regs)\n{\n\treturn 0;\n}\n\nSEC(\"?freplace\")\nint freplace_kprobe(struct pt_regs *regs)\n{\n\tregs->di = 0;\n\treturn 0;\n}\n\nfreplace_kprobe prog will attach to kprobe prog.\nkprobe prog will attach to a kernel function.\n\nWithout this patch, when the kernel function runs, its first arg will\nalways be set as 0 via the freplace_kprobe prog.\n\nTo fix the abuse of kprobe_write_ctx=true via kprobe+freplace, disallow\nattaching freplace programs on kprobe programs with different\nkprobe_write_ctx values.","source":"cvelist"}],"published":"2026-06-24T16:30:33.684Z","modified":"2026-07-21T18:21:59.100Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"7384893d970ea114952aef54ad7e3d7d2ca82d4f","fixed":"b312cf41b9e43f442613053f6cad39898e1baf96","status":"affected"},{"type":"git","introduced":"7384893d970ea114952aef54ad7e3d7d2ca82d4f","fixed":"9836cadbd96c7e0dbb0018fa60e7872dd31ac4f8","status":"affected"},{"type":"git","introduced":"7384893d970ea114952aef54ad7e3d7d2ca82d4f","fixed":"611fe4b79af72d00d80f2223354284447daafae9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.18","status":"unaffected"},{"type":"semver","introduced":"6.18.33","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.10","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","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.18","fixed":"6.18.33"},{"status":"affected","introduced":"6.19","fixed":"7.0.10"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b312cf41b9e43f442613053f6cad39898e1baf96","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9836cadbd96c7e0dbb0018fa60e7872dd31ac4f8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/611fe4b79af72d00d80f2223354284447daafae9","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-53095","url":"https://www.cve.org/CVERecord?id=CVE-2026-53095","licence":"CVE Terms of Use","modified":"2026-06-24T16:30:33.684Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-53095","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53095","licence":"Public domain","modified":"2026-07-21T18:21:59.100Z"}],"updatedAt":"2026-11-25T22:59:25.693Z","epss":{"score":0.00121,"percentile":0.02071,"date":"2026-12-01T12:00:22.000Z"}}