aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2014-09-04 10:15:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-05 20:31:03 -0400
commit18a47e6d8af01db1b691802a6bb8eae73d83ad9e (patch)
tree2fccea7845dc27a4d5543aa58c21fabf5ef0f033 /Documentation/networking
parentb1c849276b5e199f94501101c07ee9cb6ced4935 (diff)
net-timestamp: fix allocation error in test
A buffer is incorrectly zeroed to the length of the pointer. If cfg_payload_len < sizeof(void *) this can overwrites unrelated memory. The buffer contents are never read, so no need to zero. Fixes: 8fe2f761cae9 ("net-timestamp: expand documentation") Reported-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r--Documentation/networking/timestamping/txtimestamp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c
index e5b0b98a89af..b32fc2a07734 100644
--- a/Documentation/networking/timestamping/txtimestamp.c
+++ b/Documentation/networking/timestamping/txtimestamp.c
@@ -192,7 +192,6 @@ static int recv_errmsg(int fd)
192 memset(&msg, 0, sizeof(msg)); 192 memset(&msg, 0, sizeof(msg));
193 memset(&entry, 0, sizeof(entry)); 193 memset(&entry, 0, sizeof(entry));
194 memset(ctrl, 0, sizeof(ctrl)); 194 memset(ctrl, 0, sizeof(ctrl));
195 memset(data, 0, sizeof(data));
196 195
197 entry.iov_base = data; 196 entry.iov_base = data;
198 entry.iov_len = cfg_payload_len; 197 entry.iov_len = cfg_payload_len;