linux-sg2042/net/nfc/hci
Suren Baghdasaryan 674d9de02a NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
When handling SHDLC I-Frame commands "pipe" field used for indexing
into an array should be checked before usage. If left unchecked it
might access memory outside of the array of size NFC_HCI_MAX_PIPES(127).

Malformed NFC HCI frames could be injected by a malicious NFC device
communicating with the device being attacked (remote attack vector),
or even by an attacker with physical access to the I2C bus such that
they could influence the data transfers on that bus (local attack vector).
skb->data is controlled by the attacker and has only been sanitized in
the most trivial ways (CRC check), therefore we can consider the
create_info struct and all of its members to tainted. 'create_info->pipe'
with max value of 255 (uint8) is used to take an offset of the
hdev->pipes array of 127 elements which can lead to OOB write.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Allen Pais <allen.pais@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>
Suggested-by: Kevin Deus <kdeus@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-18 19:55:01 -07:00
..
Kconfig NFC: Select CRC_CCITT for SHDLC link layer of HCI based drivers 2012-05-15 17:27:28 -04:00
Makefile NFC: Changed HCI and PN544 HCI driver to use the new HCI LLC Core 2012-09-25 00:17:26 +02:00
command.c NFC: hci: Change nfc_hci_send_response gate parameter to pipe 2015-01-27 23:55:20 +01:00
core.c NFC: Fix possible memory corruption when handling SHDLC I-Frame commands 2018-09-18 19:55:01 -07:00
hci.h NFC: hci: Remove nfc_hci_pipe2gate function 2015-01-28 00:03:36 +01:00
hcp.c NFC: hci: Remove nfc_hci_pipe2gate function 2015-01-28 00:03:36 +01:00
llc.c NFC: hci: delete unused nfc_llc_get_rx_head_tail_room() 2016-07-04 12:14:05 +02:00
llc.h nfc: Fix FSF address in file headers 2013-12-11 10:56:21 -05:00
llc_nop.c nfc: Fix FSF address in file headers 2013-12-11 10:56:21 -05:00
llc_shdlc.c NFC: Convert timers to use timer_setup() 2017-11-06 01:12:10 +01:00