{"id":"CVE-2026-53095","published":"2026-06-24T16:30:33Z","modified":"2026-06-24T16:30:33Z","title":"bpf: Fix abuse of kprobe_write_ctx via freplace","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0016,"percentile":0.02718,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/b312cf41b9e43f442613053f6cad39898e1baf96","tags":[]},{"url":"https://git.kernel.org/stable/c/9836cadbd96c7e0dbb0018fa60e7872dd31ac4f8","tags":[]},{"url":"https://git.kernel.org/stable/c/611fe4b79af72d00d80f2223354284447daafae9","tags":[]}],"priority":{"score":0.5,"factors":[{"name":"EPSS percentile","points":0.54}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 7384893d970ea114952aef54ad7e3d7d2ca82d4f, < b312cf41b9e43f442613053f6cad39898e1baf96",">= 7384893d970ea114952aef54ad7e3d7d2ca82d4f, < 9836cadbd96c7e0dbb0018fa60e7872dd31ac4f8",">= 7384893d970ea114952aef54ad7e3d7d2ca82d4f, < 611fe4b79af72d00d80f2223354284447daafae9"]},{"vendor":"Linux","product":"Linux","versions":["6.18"]}],"euvd":{"id":"EUVD-2026-38963","exploited":false,"provenance":"source"}}