From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 1/1] NFC: Fix possible memory corruption when handling SHDLC I-Frame commands Date: Tue, 14 Aug 2018 12:54:13 +0300 Message-ID: <20180814095413.vbjkcjkmytkffyaz@mwanda> References: <20180813223910.26276-1-surenb@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: security@kernel.org, kdeus@google.com, Samuel Ortiz , "David S. Miller" , Allen Pais , Kees Cook , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Suren Baghdasaryan Return-path: Content-Disposition: inline In-Reply-To: <20180813223910.26276-1-surenb@google.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Thanks. This is great. I'm so glad these are finally getting fixed. Do we need to fix nfc_hci_msg_rx_work() and nfc_hci_recv_from_llc() as well? In nfc_hci_recv_from_llc() we allow pipe to be NFC_HCI_FRAGMENT (0x7f) so that's one element beyond the end of the array and the NFC_HCI_HCP_RESPONSE isn't checked. Also nci_hci_msg_rx_work() and nci_hci_data_received_cb() use NCI_HCP_MSG_GET_PIPE() so those could be off by one. regards, dan carpenter