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] [day] [month] [year] [list]
Date:   Sun, 24 Feb 2019 17:31:13 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     dcaratti@...hat.com
Cc:     vladbu@...lanox.com, xiyou.wangcong@...il.com, jhs@...atatu.com,
        jiri@...nulli.us, netdev@...r.kernel.org
Subject: Re: [PATCH net] net/sched: act_ipt: fix refcount leak when replace
 fails

From: Davide Caratti <dcaratti@...hat.com>
Date: Fri, 22 Feb 2019 12:33:25 +0100

> After commit 4e8ddd7f1758 ("net: sched: don't release reference on action
> overwrite"), the error path of all actions was converted to drop refcount
> also when the action was being overwritten. But we forgot act_ipt_init(),
> in case allocation of 'tname' was not successful:
> 
>  # tc action add action xt -j LOG --log-prefix hello index 100
>  tablename: mangle hook: NF_IP_POST_ROUTING
>          target:  LOG level warning prefix "hello" index 100
>  # tc action show action xt
>  total acts 1
> 
>          action order 0: tablename: mangle  hook: NF_IP_POST_ROUTING
>          target  LOG level warning prefix "hello"
>          index 100 ref 1 bind 0
>  # tc action replace action xt -j LOG --log-prefix world index 100
>  tablename: mangle hook: NF_IP_POST_ROUTING
>          target:  LOG level warning prefix "world" index 100
>  RTNETLINK answers: Cannot allocate memory
>  We have an error talking to the kernel
>  # tc action show action xt
>  total acts 1
> 
>          action order 0: tablename: mangle  hook: NF_IP_POST_ROUTING
>          target  LOG level warning prefix "hello"
>          index 100 ref 2 bind 0
> 
> Ensure we call tcf_idr_release(), in case 'tname' allocation failed, also
> when the action is being replaced.
> 
> Fixes: 4e8ddd7f1758 ("net: sched: don't release reference on action overwrite")
> Signed-off-by: Davide Caratti <dcaratti@...hat.com>

Applied and queued up for -stable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ