lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 May 2019 16:48:44 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Chang-Hsien Tsai <luke.tw@...il.com>, netdev@...r.kernel.org
Cc:     ast@...nel.org, kafai@...com, songliubraving@...com, yhs@...com
Subject: Re: [PATCH] samples: bpf: fix: change the buffer size for read()

On 05/19/2019 11:05 AM, Chang-Hsien Tsai wrote:
> If the trace for read is larger than 4096,
> the return value sz will be 4096.
> This results in off-by-one error on buf.
> 
>     static char buf[4096];
>     ssize_t sz;
> 
>     sz = read(trace_fd, buf, sizeof(buf));
>     if (sz > 0) {
>         buf[sz] = 0;
>         puts(buf);
>     }
> 
> Signed-off-by: Chang-Hsien Tsai <luke.tw@...il.com>

Applied, thanks!

Powered by blists - more mailing lists