Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull kprobes/x86 fix from Masami Hiramatsu:

- Fix to emulate indirect call which size is not 5 byte.

Current code expects the indirect call instructions are 5 bytes, but
that is incorrect. Usually indirect call based on register is shorter
than that, thus the emulation causes a kernel crash by accessing
wrong instruction boundary. This uses the instruction size to
calculate the return address correctly.

* tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
x86/kprobes: fix incorrect return address calculation in kprobe_emulate_call_indirect

+2 -1
+2 -1
arch/x86/kernel/kprobes/core.c
··· 576 576 { 577 577 unsigned long offs = addrmode_regoffs[p->ainsn.indirect.reg]; 578 578 579 - int3_emulate_call(regs, regs_get_register(regs, offs)); 579 + int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + p->ainsn.size); 580 + int3_emulate_jmp(regs, regs_get_register(regs, offs)); 580 581 } 581 582 NOKPROBE_SYMBOL(kprobe_emulate_call_indirect); 582 583