* [PATCH net,v2] nfc: fix potential illegal memory access
@ 2019-07-08 14:57 Yang Wei
0 siblings, 0 replies; only message in thread
From: Yang Wei @ 2019-07-08 14:57 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: davem, tglx, albin_yang
The frags_q is not properly initialized, it may result in illegal memory
access when conn_info is NULL.
The "goto free_exit" should be replaced by "goto exit".
Signed-off-by: Yang Wei <albin_yang@163.com>
---
net/nfc/nci/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 0a0c265..ce3382b 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -107,7 +107,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,
conn_info = nci_get_conn_info_by_conn_id(ndev, conn_id);
if (!conn_info) {
rc = -EPROTO;
- goto free_exit;
+ goto exit;
}
__skb_queue_head_init(&frags_q);
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-08 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08 14:57 [PATCH net,v2] nfc: fix potential illegal memory access Yang Wei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox