git: 65be931e99d4 - stable/13 - ng_hci: handle NG_HCI_M_PULLUP failure in le_advertizing_report
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 21 Jan 2023 21:33:27 UTC
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=65be931e99d4178f488b8e3066b164ad8c46fff2 commit 65be931e99d4178f488b8e3066b164ad8c46fff2 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-11-01 13:55:22 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-01-21 21:31:25 +0000 ng_hci: handle NG_HCI_M_PULLUP failure in le_advertizing_report PR: 267396 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: takawata Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37228 (cherry picked from commit 05c0c99ea37f2558155f346769a00b4180cb59ed) --- sys/netgraph/bluetooth/hci/ng_hci_evnt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c index b2cdf01423a2..fec039d1f1f6 100644 --- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c +++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c @@ -399,6 +399,10 @@ le_advertizing_report(ng_hci_unit_p unit, struct mbuf *event) /* Get remote unit address */ NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + if (event == NULL) { + error = ENOBUFS; + goto out; + } addr_type = *mtod(event, u_int8_t *); m_adj(event, sizeof(u_int8_t));