ref: b959ca328d306fb9af676b64720fea8a847da570
parent: 7b186b0779561d1d63d291d10143e8cdfc6e3064
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Sep 27 17:40:38 EDT 2022
arp: don't leak data in the padding of arp replies
--- a/sys/src/9/ip/ethermedium.c
+++ b/sys/src/9/ip/ethermedium.c
@@ -586,7 +586,7 @@
n = ifc->mintu;
rbp = allocb(n);
r = (Etherarp*)rbp->rp;
- memset(r, 0, sizeof(Etherarp));
+ memset(r, 0, n);
hnputs(r->type, ETARP);
hnputs(r->hrd, 1);
hnputs(r->pro, ETIP4);