Bugzilla – Bug 83143
VUL-0: CVE-2005-1762: kernel: amd64 / ptrace can crash the kernel
Last modified: 2021-09-26 10:34:33 UTC
There is a bug in the code checking for non canonical addresses while setting 64bit segment registers. This allows any user process to oops the kernel.
Problem should be in all x86-64 kernels released, so it would need to be backported to all maintained kernels.
Created attachment 36726 [details] Check for canonical addresses in ptrace correctly Patch from mainline
Is it public?
can you backport the patch to our kernel releases?
It should apply to SLES with some offset. Yes the problem is public. Code hasn't changed much for quite some time, so porting it to other kernels should be easy.
Created attachment 37111 [details] Check segment bases in ptrace correctly Sorry the previous patch was wrong and for another bug. Here is the correct patch. Hubert can you apply that everywhere (including SLES8)?
done.
Thanks, But sorry, there is a report for another ptrace bug that needs to be fixed too. Bugzilla will come in a jiffie.
the patch in SP1 branch is missing this hunk from 2.6.11.11 patch: is it needed ? --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c @@ -149,6 +149,11 @@ static int putreg(struct task_struct *ch return -EIO; value &= 0xffff; break; + case offsetof(struct user_regs_struct, rip): + /* Check if the new RIP address is canonical */ + if (value >= TASK_SIZE) + return -EIO; + break; } put_stack_long(child, regno - sizeof(struct pt_regs), value); return 0;
We tell all of our partners: DO NOT PASTE PATCHES INTO BUGZILLA REPORTS!!! Submit them as attachment, otherwise it is useless. So please, please, with sugar on top, don't waste our time.
Created attachment 38369 [details] Fix check to see if RIP is canonical in ptrace Here's the patch as attachment. That's the real ptrace-canonical now (we might have another one of the same name unfortunately in the tree)
ptrace-check-segment CAN-2005-0756 ptrace-canonical CAN-2005-1762
updates released
CVE-2005-1762: CVSS v2 Base Score: 2.1 (AV:L/AC:L/Au:N/C:N/I:N/A:P)