Bug 128469 - accessing /dev/kmem on hugemem kernel causes oops
accessing /dev/kmem on hugemem kernel causes oops
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-23 07:34 EDT by Neil Horman
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-20 15:55:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to range check address in /dev/kmem (1.81 KB, patch)
2004-07-23 07:36 EDT, Neil Horman
no flags Details | Diff
alternate patch from upstream 2.6 kernel to fix /dev/kmem oops problem (861 bytes, patch)
2004-07-23 07:37 EDT, Neil Horman
no flags Details | Diff

  None (edit)
Description Neil Horman 2004-07-23 07:34:11 EDT
Description of problem:
On the hugemem kernel, reading from an invalid kernel address in
/dev/kmem causes an oops

Version-Release number of selected component (if applicable):
all RHEL3 hugemem kernels

How reproducible:
always

Steps to Reproduce:
1.Boot a RHEL3 hugemem kernel
2.su root
3.cat /dev/kmem
  
Actual results:
Kernel panic

Expected results:
kernel memory data or -EFAULT error (behavior under non-hugemem kernels

Additional info:
Comment 1 Neil Horman 2004-07-23 07:36:06 EDT
Created attachment 102169 [details]
patch to range check address in /dev/kmem

This patch should preform a valid address range check on all kernels and allow
invalid addresses to return -EFAULT when passed in.
Comment 2 Neil Horman 2004-07-23 07:37:55 EDT
Created attachment 102170 [details]
alternate patch from upstream 2.6 kernel to fix /dev/kmem oops problem

I'm uploading this backport of the 2.6 kernel solution to this problem.  I'm
doing it to be complete, but I don't think its	a good solution, as the
upstream method just makes /dev/kmem return -EPERM unconditionally on all reads
and writes weather or not you are root.  It effectively depricates /dev/kmem,
and probably isn't viable to current RHEL users.
Comment 3 Neil Horman 2004-07-23 07:41:06 EDT
Sorry, didn't see the old bug was reopened.  Marking this as a dup.

*** This bug has been marked as a duplicate of 108450 ***
Comment 4 Ernie Petrides 2004-09-03 20:46:47 EDT
A fix for this problem has just been committed to the RHEL3 U4
patch pool this evening (in kernel version 2.4.21-20.3.EL).

Thanks for your work on this, Neil.  -ernie
Comment 5 John Flanagan 2004-12-20 15:55:46 EST
An errata 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 the 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/RHBA-2004-550.html

Note You need to log in before you can comment on or make changes to this bug.