All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+bbe84a4010eeea00982d@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: [syzbot] [PATCH] Test for aea6bf908d73
Date: Thu, 09 Nov 2023 04:34:16 -0800	[thread overview]
Message-ID: <0000000000001150ff0609b76c4b@google.com> (raw)

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [PATCH] Test for aea6bf908d73
Author: eadavis@qq.com

please test uaf in nfc_alloc_send_skb

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git aea6bf908d73

diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 6c9592d05120..b463452c507e 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -30,6 +30,7 @@
 #include <net/nfc/nci.h>
 #include <net/nfc/nci_core.h>
 #include <linux/nfc.h>
+#include "../llcp.h"
 
 struct core_conn_create_data {
 	int length;
@@ -1206,6 +1207,9 @@ EXPORT_SYMBOL(nci_allocate_device);
  */
 void nci_free_device(struct nci_dev *ndev)
 {
+	struct nfc_llcp_sock *nls = container_of(ndev->nfc_dev, 
+			struct nfc_llcp_sock, dev);
+	nls->local = NULL;
 	nfc_free_device(ndev->nfc_dev);
 	nci_hci_deallocate(ndev);
 	kfree(ndev);


             reply	other threads:[~2023-11-09 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 12:34 syzbot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-09 13:02 [syzbot] [net?] [nfc?] KASAN: slab-use-after-free Read in nfc_alloc_send_skb syzbot
2023-11-09 13:28 ` [syzbot] [PATCH] Test for aea6bf908d73 syzbot
2023-11-09 14:14 ` syzbot
2023-11-09 14:33 ` syzbot
2023-11-10 11:26 ` syzbot
2023-11-10 12:19 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000001150ff0609b76c4b@google.com \
    --to=syzbot+bbe84a4010eeea00982d@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.