Bug 537177 (CVE-2009-3556)

Summary: CVE-2009-3556 kernel: qla2xxx NPIV vport management pseudofiles are world writable
Product: [Other] Security Response Reporter: Bryn M. Reeves <bmr>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: atangrin, coughlan, dhoward, dwu, jolsa, jrusnack, lwang, revers, rkhan, security-response-team, vanhoof, vdanen
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-10 16:22:24 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: 537317, 537318, 537319    
Bug Blocks:    
Attachments:
Description Flags
Change sysfs permissions from 0222 to 0644 for a bunch of qla2xxx sysfs files none

Description Bryn M. Reeves 2009-11-12 18:10:10 UTC
Description of problem:

The qla2xxx driver now supports NPIV which adds two new sysfs pseduofiles to the SCSI host attributes:

w--w--w- root root  /sys/class/scsi_host/host1/vport_create
w--w--w- root root  /sys/class/scsi_host/host1/vport_delete
w--w--w- root root  /sys/class/scsi_host/host2/vport_create
w--w--w- root root  /sys/class/scsi_host/host2/vport_delete  

These file default to world writable (S_IWUGO/0222). Upstream uses S_IWUSR (0644) for these files although they've moved around a bit - the equivalent attributes are created from drivers/scsi/scsi_transport_fc.c now.

Version-Release number of selected component (if applicable):
2.6.18-63.el5 onwards

How reproducible:
100% on systems that loads qla2xxx on NPIV capable hardware.

Steps to Reproduce:
1. ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_*
   ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_id
   ls -l /sys/class/scsi_host/<a qla2xxx host>/vport_disable
   ls -l /sys/class/scsi_host/<a qla2xxx host>/symbolic_port_name

Actual results:
--w--w--w- root root  /sys/class/scsi_host/host1/vport_create
--w--w--w- root root  /sys/class/scsi_host/host1/vport_delete
--w--w--w- root root  /sys/class/scsi_host/host2/vport_create
--w--w--w- root root  /sys/class/scsi_host/host2/vport_delete
etc.

Expected results:
-rw-r--r-- root root  /sys/class/scsi_host/host1/vport_create
-rw-r--r-- root root  /sys/class/scsi_host/host1/vport_delete
-rw-r--r-- root root  /sys/class/scsi_host/host2/vport_create
-rw-r--r-- root root  /sys/class/scsi_host/host2/vport_delete
etc.

Additional info:

Comment 1 Bryn M. Reeves 2009-11-12 18:12:13 UTC
Created attachment 369281 [details]
Change sysfs permissions from 0222 to 0644 for a bunch of qla2xxx sysfs files

Smoke tested by me but I have no NPIV-capable hardware here to test properly.

Comment 6 errata-xmlrpc 2010-01-19 23:37:06 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0046 https://rhn.redhat.com/errata/RHSA-2010-0046.html