From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH bpf-next] bpf: fix sock_map_alloc() error path Date: Tue, 13 Feb 2018 15:43:12 -0800 Message-ID: <1518565392.3715.189.camel@gmail.com> References: <1518564832.3715.187.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev , Daniel Borkmann To: John Fastabend , Alexei Starovoitov Return-path: Received: from mail-pl0-f49.google.com ([209.85.160.49]:38121 "EHLO mail-pl0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966064AbeBMXnO (ORCPT ); Tue, 13 Feb 2018 18:43:14 -0500 Received: by mail-pl0-f49.google.com with SMTP id h10so859571plt.5 for ; Tue, 13 Feb 2018 15:43:14 -0800 (PST) In-Reply-To: <1518564832.3715.187.camel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2018-02-13 at 15:33 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > In case user program provides silly parameters, we want > a map_alloc() handler to return an error, not a NULL pointer, > otherwise we crash later in find_and_alloc_map() > > Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") > Signed-off-by: Eric Dumazet > Reported-by: syzbot > --- This would apply to net or bpf trees, not -next ones, sorry for the confusion in the [PATCH bpf-next] prefix. Bug was added in 4.14