diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-08-29 07:49:16 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-08-29 07:49:16 +0000 |
commit | b97be2cd5195396d8a8d7df1283a2a9dee85f2f6 (patch) | |
tree | 6ac9c3ca92ca5cfeba39ffecbaa1d079bb76b8c4 /sys/dev/pci/if_iwm.c | |
parent | 853f91fa6d0acbc4fd3080b0af5b99bbce7e9808 (diff) |
fix iwm(4) frame length check to account for header in firmware rx packet
ok mpi@ procter@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 55c1586845c..42cb00c62cc 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.246 2019/08/29 07:48:45 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.247 2019/08/29 07:49:15 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -3545,7 +3545,7 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, struct iwm_rx_packet *pkt, IC2IFP(ic)->if_ierrors++; return; } - if (len > IWM_RBUF_SIZE) { + if (len > IWM_RBUF_SIZE - sizeof(*rx_res)) { IC2IFP(ic)->if_ierrors++; return; } |