This is a note to let you know that I've just added the patch titled

    nfc: netlink: Add check on NFC_ATTR_VENDOR_DATA

to the 4.2-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfc-netlink-add-check-on-nfc_attr_vendor_data.patch
and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From fe202fe95564023223ce1910c9e352f391abb1d5 Mon Sep 17 00:00:00 2001
From: Christophe Ricard <[email protected]>
Date: Fri, 14 Aug 2015 22:33:40 +0200
Subject: nfc: netlink: Add check on NFC_ATTR_VENDOR_DATA

From: Christophe Ricard <[email protected]>

commit fe202fe95564023223ce1910c9e352f391abb1d5 upstream.

NFC_ATTR_VENDOR_DATA is an optional vendor_cmd argument.
The current code was potentially using a non existing argument
leading to potential catastrophic results.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 net/nfc/netlink.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -1518,8 +1518,8 @@ static int nfc_genl_vendor_cmd(struct sk
        if (!dev || !dev->vendor_cmds || !dev->n_vendor_cmds)
                return -ENODEV;
 
-       data = nla_data(info->attrs[NFC_ATTR_VENDOR_DATA]);
-       if (data) {
+       if (info->attrs[NFC_ATTR_VENDOR_DATA]) {
+               data = nla_data(info->attrs[NFC_ATTR_VENDOR_DATA]);
                data_len = nla_len(info->attrs[NFC_ATTR_VENDOR_DATA]);
                if (data_len == 0)
                        return -EINVAL;


Patches currently in stable-queue which might be from 
[email protected] are

queue-4.2/nfc-st-nci-fix-typo-when-changing-from-st21nfcb-to-st-nci.patch
queue-4.2/nfc-st-nci-remove-duplicate-file-platform_data-st_nci.h.patch
queue-4.2/nfc-st-nci-fix-non-accurate-comment-for-st_nci_i2c_read.patch
queue-4.2/nfc-st-nci-free-data-with-irrelevant-ndlc-pcb_sync-value.patch
queue-4.2/nfc-st-nci-fix-use-of-uninitialized-variables-in-error-path.patch
queue-4.2/nfc-netlink-warning-fix.patch
queue-4.2/nfc-st-nci-remove-data-from-ack_pending_q-when-receiving-a-sync_ack.patch
queue-4.2/nfc-netlink-add-check-on-nfc_attr_vendor_data.patch
queue-4.2/nfc-nci-hci-add-check-on-skb-nci_hci_send_cmd-parameter.patch
queue-4.2/nfc-st21nfca-fix-use-of-uninitialized-variables-in-error-path.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to