Thread (7 messages) flat view 7 messages, 2 authors, 2024-02-19

Re: [PATCH net 2/3] tools: ynl: make sure we always pass yarg to mnl_cb_run

From: Nicolas Dichtel <hidden>
Date: 2024-02-19 17:18:48

Le 17/02/2024 à 01:17, Jakub Kicinski a écrit :
There is one common error handler in ynl - ynl_cb_error().
It expects priv to be a pointer to struct ynl_parse_arg AKA yarg.
To avoid potential crashes if we encounter a stray NLMSG_ERROR
always pass yarg as priv (or a struct which has it as the first
member).

ynl_cb_null() has a similar problem directly - it expects yarg
but priv passed by the caller is ys.

Found by code inspection.

Fixes: 86878f14d71a ("tools: ynl: user space helpers")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Nicolas Dichtel <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help