From: bugzilla-daemon@bugzilla.kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 209407] skb_over_panic in cdc_mbim_tx_fixup
Date: Fri, 01 Jan 2021 09:52:30 +0000 [thread overview]
Message-ID: <bug-209407-208809-UavBF3lJBS@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-209407-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=209407
--- Comment #7 from Jouni Seppänen (jks@iki.fi) ---
It looks like the code is calling memset with 0xFFFFFFFE, i.e. negative 2. I
added a check in the "If collected data size is less or equal ctx->min_tx_pkt"
block:
if (!(dev->driver_info->flags & FLAG_SEND_ZLP) &&
skb_out->len > ctx->min_tx_pkt) {
if (ctx->tx_curr_size < skb_out->len) {
pr_err("ctx->tx_curr_size = %x < skb_out->len = %x",
ctx->tx_curr_size, skb_out->len);
BUG();
}
padding_count = ctx->tx_curr_size - skb_out->len;
And after rerunning my test case, I see:
[ 683.677876] ctx->tx_curr_size = 4000 < skb_out->len = 4002
[ 683.677953] ------------[ cut here ]------------
[ 683.683590] kernel BUG at drivers/net/usb/cdc_ncm.c:1414!
So ctx->tx_curr_size is 0x4000 but skb_out->len is two larger.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2021-01-01 9:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 15:34 [Bug 209407] New: skb_over_panic in cdc_mbim_tx_fixup bugzilla-daemon
2020-12-31 6:05 ` [Bug 209407] " bugzilla-daemon
2020-12-31 12:20 ` bugzilla-daemon
2021-01-01 8:29 ` bugzilla-daemon
2021-01-01 9:52 ` bugzilla-daemon [this message]
2021-01-01 16:25 ` [Bug 209407] cdc_ncm_fill_tx_frame calls memset with huge length when called from cdc_mbim_tx_fixup bugzilla-daemon
2021-01-03 15:02 ` bugzilla-daemon
2021-01-22 12:20 ` bugzilla-daemon
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=bug-209407-208809-UavBF3lJBS@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).