Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 493088

Summary: Kprobes bugfixes backport from 2.6.29
Product: Red Hat Enterprise Linux 5 Reporter: Masami Hiramatsu <mhiramat>
Component: kernelAssignee: Masami Hiramatsu <mhiramat>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: high    
Version: 5.4CC: dzickus, fche, hdong
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 08:31:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 329781    
Attachments:
Description Flags
[RHEL5.4][PATCH] prevent boosting kprobes on exception address none

Description Masami Hiramatsu 2009-03-31 15:33:09 UTC
Description of problem:

Below two kprobes bugfix patches should be backported from 2.6.29.
Both of them is possible to cause critical kernel panic on x86-32.

---
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=30390880debce4a68fd23e87a787f27609e4bf4a

prevent boosting kprobes on exception address

Don't boost at the addresses which are listed on exception tables,
because major page fault will occur on those addresses.  In that case,
kprobes can not ensure that when instruction buffer can be freed since
some processes will sleep on the buffer.

kprobes-ia64 already has same check.
---
And
---
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9be260a646bf76fa418ee519afa10196b3164681

prevent kprobes from catching spurious page faults

Prevent kprobes from catching spurious faults which will cause infinite
recursive page-fault and memory corruption by stack overflow.
---

Version-Release number of selected component (if applicable):
RHEL5.4

Comment 1 Masami Hiramatsu 2009-04-16 20:40:43 UTC
Sorry, 

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9be260a646bf76fa418ee519afa10196b3164681

is not needed to apply. It seems already fixed on RHEL5.3. Thanks,

Comment 2 Masami Hiramatsu 2009-04-20 19:23:57 UTC
Created attachment 340412 [details]
[RHEL5.4][PATCH] prevent boosting kprobes on exception address

Here is the patch(commit 30390880debce4a68fd23e87a787f27609e4bf4a
) ported from 2.6.29 to 2.6.18-139.el5.

Changes from original:
- change both of arch/i386/kernel/kprobes.c and arch/x86_64/kernel/kprobes.c
- include linux/module.h for search_exception_tables().

Comment 3 Don Zickus 2009-04-27 16:00:37 UTC
in kernel-2.6.18-141.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 7 errata-xmlrpc 2009-09-02 08:31:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2009-1243.html