ref: 4fd1e64e25ea7c452bd43372c26202fdc37d5a30
parent: b73a9622499428876c88ddc9ff1746a871cda567
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);
--
⑨