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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y2gzi6m3.fsf@toke.dk>
Date:   Mon, 11 Jan 2021 21:03:16 +0100
From:   Toke Høiland-Jørgensen <toke@...hat.com>
To:     Jiri Olsa <jolsa@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>
Subject: Re: [PATCH] bpf: Prevent double bpf_prog_put call from
 bpf_tracing_prog_attach

Jiri Olsa <jolsa@...nel.org> writes:

> The bpf_tracing_prog_attach error path calls bpf_prog_put
> on prog, which causes refcount underflow when it's called
> from link_create function.
>
>   link_create
>     prog = bpf_prog_get              <-- get
>     ...
>     tracing_bpf_link_attach(prog..
>       bpf_tracing_prog_attach(prog..
>         out_put_prog:
>           bpf_prog_put(prog);        <-- put
>
>     if (ret < 0)
>       bpf_prog_put(prog);            <-- put
>
> Removing bpf_prog_put call from bpf_tracing_prog_attach
> and making sure its callers call it instead.
>
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>

Acked-by: Toke Høiland-Jørgensen <toke@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ