lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1332921457.30140.1393357561516.JavaMail.zimbra@efficios.com>
Date:	Tue, 25 Feb 2014 19:46:01 +0000 (UTC)
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"David S. Miller" <davem@...emloft.net>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [BUG kretprobes] kretprobe triggers General Protection Faults

Hi,

I had a bug report[1] from a user trying to add a kretprobe on the system
call entry code path:

arch/x86/kernel/entry_64.S:

ffffffff813dffe2 <system_call_fastpath+0x16>:
        cmpl $__NR_syscall_max,%eax
#endif
        ja badsys
        movq %r10,%rcx
        call *sys_call_table(,%rax,8)  # XXX:    rip relative
        movq %rax,RAX-ARGOFFSET(%rsp)   <--- return address pointing here

And all hell breaks loose (various types of faults, machine reboots,
applications exit randomly, etc.). I understand that this code path
is not marked as unsafe against kprobes, and I tested that a kprobes
indeed works fine there. However, kretprobes probably presumes a function
stack layout that is just not valid for the syscall entry routine.

Any thoughts on how kretprobes should handle this ?

Thanks,

Mathieu

[1] http://bugs.lttng.org/issues/687

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ