Thread (3 messages) flat view 3 messages, 3 authors, 2018-05-11

Re: [PATCH v2 net 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing

From: David Miller <davem@davemloft.net>
Date: 2018-05-11 19:53:18

From: Roman Mashak <redacted>
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 <redacted>
Applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help