Bug 187498

Summary: diskdump_sysfs_store() needs to check sscanf retval
Product: Red Hat Enterprise Linux 4 Reporter: Tim Burke <tburke>
Component: kernelAssignee: Alexander Viro <aviro>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: jbaron, ntachino
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0575 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 22:59:50 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: 161161, 181409    

Description Tim Burke 2006-03-31 13:17:25 UTC
kernel/dump.c::diskdump_sysfs_store() calls sscanf(..., "%d", &part) but
doesn't check that it had returned 1.  It proceeds to use the value of part
unconditionally; if string wasn't a number, part will be used uninitialized.
Fix: add the check, return -EINVAL if it fails.

Comment 1 Bob Johnson 2006-04-11 17:11:08 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 4.4 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 4.4 release.

Comment 2 Jason Baron 2006-04-21 03:24:43 UTC
committed in stream U4 build 34.21. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 5 Red Hat Bugzilla 2006-08-10 22:59:52 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 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/RHSA-2006-0575.html