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
fc_elsct.c
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
fc_libfc.c
fc_libfc.h
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