Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 146105 - CVE-2005-0504 moxa CAP_SYS_RAWIO missing (-unsupported)
CVE-2005-0504 moxa CAP_SYS_RAWIO missing (-unsupported)
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Maly
Brian Brock
: Security
Depends On:
Blocks: 156320
  Show dependency treegraph
Reported: 2005-01-25 08:11 EST by Mark J. Cox
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version: RHSA-2005-663
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-28 10:45:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:663 qe-ready SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 6 2005-09-28 00:00:00 EDT

  None (edit)
Description Mark J. Cox 2005-01-25 08:11:44 EST
*** This bug has been split off bug 146102 ***

------- Original comment by Mark J. Cox (Security Response Team) on 2005.01.25
08:07 -------

The moxa char driver is missing a CAP_SYS_RAWIO check which could allow a local
user the ability to do things like replace the firmware.  This is already fixed
in 2.4-bk and in 2.6.10-ac7 from Alan Cox (although it's ommitted from 2.6.10-ac10).

Patch available:

Note moxa is unsupported
Comment 2 Ernie Petrides 2005-04-27 22:44:43 EDT
Reassigning to Brian.

Brian, Jason posted a Pensacola patch to RHKL here:


There were two acks but one objection, though.
Comment 3 Brian Maly 2005-04-28 17:25:50 EDT
Posted the following patch to rhkernel-list (pending approval)

--- drivers/char/moxa.c.orig    2005-04-28 11:40:34.000000000 -0400
+++ drivers/char/moxa.c 2005-04-28 11:45:44.000000000 -0400
@@ -905,6 +905,8 @@ static int moxa_ioctl(struct tty_struct 
        case TIOCSSERIAL:
                return (moxa_set_serial_info(ch, (struct serial_struct *) arg));
+               if(!capable(CAP_SYS_ADMIN))
+                       return -EACCES;
                retval = MoxaDriverIoctl(cmd, arg, port);
        return (retval);
Comment 4 Brian Maly 2005-05-04 10:16:16 EDT
This patch ended up being better. Already ACKed.

--- linux-2.4.21/drivers/char/moxa.c.orig	2005-05-03 14:48:37.000000000 -0400
+++ linux-2.4.21/drivers/char/moxa.c	2005-05-03 15:29:59.000000000 -0400
@@ -905,6 +905,8 @@ static int moxa_ioctl(struct tty_struct 
 		return (moxa_set_serial_info(ch, (struct serial_struct *) arg));
+		if (!capable(CAP_SYS_ADMIN))
+			return -EPERM;
 		retval = MoxaDriverIoctl(cmd, arg, port);
 	return (retval);
@@ -1766,15 +1768,21 @@ int MoxaDriverIoctl(unsigned int cmd, un
+	 	if (!capable(CAP_SYS_RAWIO))
+			return -EPERM;
 		i = moxaloadbios(dltmp.cardno, dltmp.buf, dltmp.len);
 		return (i);
 		return moxafindcard(dltmp.cardno);
 	case MOXA_LOAD_C320B:
+		if (!capable(CAP_SYS_RAWIO))
+			return -EPERM;
 		moxaload320b(dltmp.cardno, dltmp.buf, dltmp.len);
 	default: /* to keep gcc happy */
 		return (0);
+		if (!capable(CAP_SYS_RAWIO))
+			return -EPERM;
 		i = moxaloadcode(dltmp.cardno, dltmp.buf, dltmp.len);
 		if (i == -1)
 			return (-EFAULT);
Comment 5 Ernie Petrides 2005-05-04 20:42:41 EDT
A fix for this problem has just been committed to the RHEL3 U6
patch pool this evening (in kernel version 2.4.21-32.3.EL).
Comment 12 Red Hat Bugzilla 2005-09-28 10:45:06 EDT
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.


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