mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [syzbot] [PATCH] Test for aea6bf908d73
@ 2023-11-09 12:34 syzbot
  0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2023-11-09 12:34 UTC (permalink / raw)
  To: linux-kernel

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);


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [syzbot] [net?] [nfc?] KASAN: slab-use-after-free Read in nfc_alloc_send_skb
@ 2023-11-09 13:02 syzbot
  2023-11-09 13:28 ` [syzbot] [PATCH] Test for aea6bf908d73 syzbot
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: syzbot @ 2023-11-09 13:02 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

net/nfc/nci/core.c:1210:30: error: static assertion failed due to requirement '__builtin_types_compatible_p(struct nfc_dev, struct nfc_dev *) || __builtin_types_compatible_p(struct nfc_dev, void)': pointer type mismatch in container_of()


Tested on:

commit:         aea6bf90 Merge tag 'f2fs-for-6.7-rc1' of git://git.ker..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=93ac5233c138249e
dashboard link: https://syzkaller.appspot.com/bug?extid=bbe84a4010eeea00982d
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=1750e11f680000


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-10 19:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 12:34 [syzbot] [PATCH] Test for aea6bf908d73 syzbot
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®