Bug 445863

Summary: linux-2.6.9-MOXA-buffer-overflow-in-moxa-driver.patch typo
Product: Red Hat Enterprise Linux 4 Reporter: Johnny Hughes <johnny>
Component: kernelAssignee: Ivan Vecera <ivecera>
Status: CLOSED NOTABUG QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 4.6CC: vgoyal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-04 16:06:34 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:

Description Johnny Hughes 2008-05-09 14:39:24 UTC
Description of problem:
there is a typo in linux-2.6.9-MOXA-buffer-overflow-in-moxa-driver.patch in the
just released kernel (2.6.9-67.0.15.EL) on line 15.  it says:

+       if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS || dltmp.len < 0 ||
dltmp.len > sizeof(moxaBuf))

it should be:

+       if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS || dltmp.len < 0 ||
dltmp.len > sizeof(moxaBuff))

(the last "f" is missing in moxaBuff)

This typo causes moxa.c to not compile if it is enabled and a new kernel compiled.

Version-Release number of selected component (if applicable):
2.6.9-67.0.15.EL


How reproducible:
always

Steps to Reproduce:
1.  Enable MOXA serial card in the kernel config file and recompile the kernel.


Actual results:
Kernel compile fails with this error:

drivers/char/moxa.c: In function `MoxaDriverIoctl':
drivers/char/moxa.c:1687: error: `moxaBuf' undeclared (first use in this function)
drivers/char/moxa.c:1687: error: (Each undeclared identifier is reported only once
drivers/char/moxa.c:1687: error: for each function it appears in.)


Expected results:
Kernel should build.

Comment 1 Prarit Bhargava 2008-05-12 12:48:23 UTC
While we (Red Hat) do not ship the moxa module, it should at least compile.

P.

Comment 2 Ivan Vecera 2008-09-04 16:04:02 UTC
The moxa driver is no longer shipped in the RHEL-4 kernel and the affected patch was reverted.