pull-request: can 2021-01-27

4 messages, 2 authors, 2021-01-28 · open the first message on its own page

pull-request: can 2021-01-27

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-01-27 09:45:06

Hello Jakub, hello David,

this is a pull request of 1 patch for net/master.

The patch is by Dan Carpenter and fixes a potential information leak in
can_fill_info().

Note: Sorry to say this again: This patch touches "drivers/net/can/dev.c". In
net-next/master this file has been moved to drivers/net/can/dev/dev.c [1] and
parts of it have been transfered into separate files. This may result in a
merge conflict. Please carry this patch forward, the change is rather simple.

[1] 3e77f70e7345 can: dev: move driver related infrastructure into separate subdir

regards,
Marc

---

The following changes since commit b491e6a7391e3ecdebdd7a097550195cc878924a:

  net: lapb: Add locking to the lapb module (2021-01-26 17:53:45 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-5.11-20210127

for you to fetch changes up to b552766c872f5b0d90323b24e4c9e8fa67486dd5:

  can: dev: prevent potential information leak in can_fill_info() (2021-01-27 10:25:01 +0100)

----------------------------------------------------------------
linux-can-fixes-for-5.11-20210127

----------------------------------------------------------------
Dan Carpenter (1):
      can: dev: prevent potential information leak in can_fill_info()

 drivers/net/can/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[net] can: dev: prevent potential information leak in can_fill_info()

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-01-27 09:44:45

From: Dan Carpenter <redacted>

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 <redacted>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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)
base-commit: b491e6a7391e3ecdebdd7a097550195cc878924a
-- 
2.29.2

Re: [net] can: dev: prevent potential information leak in can_fill_info()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-01-28 02:01:21

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 <redacted>

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 <redacted>
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

Re: pull-request: can 2021-01-27

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-01-28 02:01:29

Hello:

This pull request was applied to netdev/net.git (refs/heads/master):

On Wed, 27 Jan 2021 10:40:27 +0100 you wrote:
Hello Jakub, hello David,

this is a pull request of 1 patch for net/master.

The patch is by Dan Carpenter and fixes a potential information leak in
can_fill_info().

[...]
Here is the summary with links:
  - pull-request: can 2021-01-27
    https://git.kernel.org/netdev/net/c/45a81464819a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help