[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <05ec7e25-8e80-194f-db19-2fccb3e34169@polito.it>
Date: Wed, 24 Oct 2018 17:08:14 -0500
From: Mauricio Vasquez <mauricio.vasquez@...ito.it>
To: Daniel Borkmann <daniel@...earbox.net>, ast@...nel.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH bpf 6/7] bpf: fix leaking uninitialized memory on pop/peek
helpers
On 10/24/18 3:05 PM, Daniel Borkmann wrote:
> Commit f1a2e44a3aec ("bpf: add queue and stack maps") added helpers
> with ARG_PTR_TO_UNINIT_MAP_VALUE. Meaning, the helper is supposed to
> fill the map value buffer with data instead of reading from it like
> in other helpers such as map update. However, given the buffer is
> allowed to be uninitialized (since we fill it in the helper anyway),
> it also means that the helper is obliged to wipe the memory in case
> of an error in order to not allow for leaking uninitialized memory.
> Given pop/peek is both handled inside __{stack,queue}_map_get(),
> lets wipe it there on error case, that is, empty stack/queue.
>
> Fixes: f1a2e44a3aec ("bpf: add queue and stack maps")
> Signed-off-by: Daniel Borkmann<daniel@...earbox.net>
> Acked-by: Alexei Starovoitov<ast@...nel.org>
> Cc: Mauricio Vasquez B<mauricio.vasquez@...ito.it>
Thanks for the fix Daniel.
Acked-by: Mauricio Vasquez B<mauricio.vasquez@...ito.it>
Powered by blists - more mailing lists