1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request from GHSA-xqm8-xj74-fjw2

gnrc_sixlowpan_iphc: check IPHC dispatch for truncation
This commit is contained in:
Kaspar Schleiser 2023-04-21 11:56:49 +02:00 committed by GitHub
commit 0c52207544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -734,6 +734,14 @@ void gnrc_sixlowpan_iphc_recv(gnrc_pktsnip_t *sixlo, void *rbuf_ptr,
gnrc_sixlowpan_frag_vrb_t *vrbe = NULL;
#endif /* MODULE_GNRC_SIXLOWPAN_FRAG_VRB */
if (sixlo->size < 2U) {
DEBUG("6lo iphc: IPHC header truncated\n");
if (rbuf != NULL) {
gnrc_sixlowpan_frag_rb_remove(rbuf);
}
gnrc_pktbuf_release(sixlo);
return;
}
if (rbuf != NULL) {
ipv6 = rbuf->pkt;
assert(ipv6 != NULL);