linux/drivers/scsi/libfc
Chris Leech fa06883281 libfc: sanity check cpu number extracted from xid
In the receive path libfc extracts a cpu number from the ox_id in the
fiber channel header and uses that to do a per_cpu_ptr conversion.  If,
for some reason, a frame is received with an invalid ox_id, per_cpu_ptr
will return an invalid pointer and the libfc receive path will panic the
system trying to use it.

I'm currently looking at such a case, and I don't yet know why a cpu
number > nr_cpu_ids is appearing in an exchange id.  But adding a sanity
check in libfc prevents a system panic, and seems like good idea when
dealing with frames coming in from the network.

Signed-off-by: Chris Leech <cleech@redhat.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-07-13 21:49:57 -04:00
..
fc_disc.c libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config} 2013-03-25 16:03:03 -07:00
fc_elsct.c [SCSI] libfc: Make the libfc Common Transport(CT) code generic 2012-02-19 08:08:58 -06:00
fc_exch.c libfc: sanity check cpu number extracted from xid 2016-07-13 21:49:57 -04:00
fc_fcp.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
fc_frame.c [SCSI] libfc, fcoe, bnx2fc: cleanup fcoe_dev_stats 2012-07-20 08:31:47 +01:00
fc_libfc.c libfc: Replace rcu_assign_pointer() with RCU_INIT_POINTER() 2014-09-30 09:28:36 +02:00
fc_libfc.h libfc, libfcoe, fcoe: Convert debug_logging macros to pr_info 2012-12-14 10:38:55 -08:00
fc_lport.c scsi: libfc: fix seconds_since_last_reset calculation 2016-07-12 23:16:31 -04:00
fc_npiv.c libfc: Use the correct function name in kernel-doc comment. 2015-11-09 17:15:52 -08:00
fc_rport.c libfc: Update rport reference counting 2016-07-12 23:16:31 -04:00
Makefile