All of lore.kernel.org
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Nick Child <nnac123@linux.ibm.com>
Cc: netdev@vger.kernel.org, haren@linux.ibm.com, ricklind@us.ibm.com,
	nick.child@ibm.com
Subject: Re: [PATCH net] ibmvnic: Don't reference skb after sending to VIOS
Date: Tue, 18 Feb 2025 01:20:33 +0000	[thread overview]
Message-ID: <173984163302.3591662.5271002902483430576.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20250214155233.235559-1-nnac123@linux.ibm.com>

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 14 Feb 2025 09:52:33 -0600 you wrote:
> Previously, after successfully flushing the xmit buffer to VIOS,
> the tx_bytes stat was incremented by the length of the skb.
> 
> It is invalid to access the skb memory after sending the buffer to
> the VIOS because, at any point after sending, the VIOS can trigger
> an interrupt to free this memory. A race between reading skb->len
> and freeing the skb is possible (especially during LPM) and will
> result in use-after-free:
>  ==================================================================
>  BUG: KASAN: slab-use-after-free in ibmvnic_xmit+0x75c/0x1808 [ibmvnic]
>  Read of size 4 at addr c00000024eb48a70 by task hxecom/14495
>  <...>
>  Call Trace:
>  [c000000118f66cf0] [c0000000018cba6c] dump_stack_lvl+0x84/0xe8 (unreliable)
>  [c000000118f66d20] [c0000000006f0080] print_report+0x1a8/0x7f0
>  [c000000118f66df0] [c0000000006f08f0] kasan_report+0x128/0x1f8
>  [c000000118f66f00] [c0000000006f2868] __asan_load4+0xac/0xe0
>  [c000000118f66f20] [c0080000046eac84] ibmvnic_xmit+0x75c/0x1808 [ibmvnic]
>  [c000000118f67340] [c0000000014be168] dev_hard_start_xmit+0x150/0x358
>  <...>
>  Freed by task 0:
>  kasan_save_stack+0x34/0x68
>  kasan_save_track+0x2c/0x50
>  kasan_save_free_info+0x64/0x108
>  __kasan_mempool_poison_object+0x148/0x2d4
>  napi_skb_cache_put+0x5c/0x194
>  net_tx_action+0x154/0x5b8
>  handle_softirqs+0x20c/0x60c
>  do_softirq_own_stack+0x6c/0x88
>  <...>
>  The buggy address belongs to the object at c00000024eb48a00 which
>   belongs to the cache skbuff_head_cache of size 224
> ==================================================================
> 
> [...]

Here is the summary with links:
  - [net] ibmvnic: Don't reference skb after sending to VIOS
    https://git.kernel.org/netdev/net/c/bdf5d13aa05e

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



      parent reply	other threads:[~2025-02-18  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 15:52 [PATCH net] ibmvnic: Don't reference skb after sending to VIOS Nick Child
2025-02-17 16:10 ` Simon Horman
2025-02-18  1:20 ` patchwork-bot+netdevbpf [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=173984163302.3591662.5271002902483430576.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=haren@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nick.child@ibm.com \
    --cc=nnac123@linux.ibm.com \
    --cc=ricklind@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.