Message ID | 20210127094028.2778793-2-mkl@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | b552766c872f5b0d90323b24e4c9e8fa67486dd5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] can: dev: prevent potential information leak in can_fill_info() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: wg@grandegger.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 27 Jan 2021 10:40:28 +0100 you wrote: > From: Dan Carpenter <dan.carpenter@oracle.com> > > The "bec" struct isn't necessarily always initialized. For example, the > mcp251xfd_get_berr_counter() function doesn't initialize anything if the > interface is down. > > Fixes: 52c793f24054 ("can: netlink support for bus-error reporting and counters") > Link: https://lore.kernel.org/r/YAkaRdRJncsJO8Ve@mwanda > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > > [...] Here is the summary with links: - [net] can: dev: prevent potential information leak in can_fill_info() https://git.kernel.org/netdev/net/c/b552766c872f You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 8b1ae023cb21..c73e2a65c904 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -1163,7 +1163,7 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev) { struct can_priv *priv = netdev_priv(dev); struct can_ctrlmode cm = {.flags = priv->ctrlmode}; - struct can_berr_counter bec; + struct can_berr_counter bec = { }; enum can_state state = priv->state; if (priv->do_get_state)