From: David Miller <davem@davemloft.net>
To: mrv@mojatatu.com
Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
alexander.duyck@gmail.com
Subject: Re: [PATCH v2 net 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing
Date: Fri, 11 May 2018 15:53:16 -0400 (EDT) [thread overview]
Message-ID: <20180511.155316.1868857547116099353.davem@davemloft.net> (raw)
In-Reply-To: <1526050509-30487-1-git-send-email-mrv@mojatatu.com>
From: Roman Mashak <mrv@mojatatu.com>
Date: Fri, 11 May 2018 10:55:09 -0400
> When application fails to pass flags in netlink TLV for a new skbedit action,
> the kernel results in the following oops:
...
> The caller calls action's ->init() and passes pointer to "struct tc_action *a",
> which later may be initialized to point at the existing action, otherwise
> "struct tc_action *a" is still invalid, and therefore dereferencing it is an
> error as happens in tcf_idr_release, where refcnt is decremented.
>
> So in case of missing flags tcf_idr_release must be called only for
> existing actions.
>
> v2:
> - prepare patch for net tree
>
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2018-05-11 19:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 14:55 [PATCH v2 net 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing Roman Mashak
2018-05-11 17:47 ` Cong Wang
2018-05-11 19:53 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180511.155316.1868857547116099353.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.duyck@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).