From: David Miller <davem@davemloft.net>
To: lixiaoping3@huawei.com
Cc: huangdaode@hisilicon.com, lipeng321@huawei.com,
yisen.zhuang@huawei.com, salil.mehta@huawei.com,
yankejian@huawei.com, mbrugger@suse.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH net v2] net: hns: fix ethtool_get_strings overflow in hns driver
Date: Tue, 02 May 2017 15:08:32 -0400 (EDT) [thread overview]
Message-ID: <20170502.150832.1539345702174708842.davem@davemloft.net> (raw)
In-Reply-To: <20170502024652.39536-1-lixiaoping3@huawei.com>
From: Timmy Li <lixiaoping3@huawei.com>
Date: Tue, 2 May 2017 10:46:52 +0800
> hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
> is not enough for ethtool_get_strings(), which will cause random memory
> corruption.
>
> When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
> the following can be observed without this patch:
> [ 43.115200] Slab corruption (Not tainted): Acpi-ParseExt start=ffff801fb0b69030, len=80
> [ 43.115206] Redzone: 0x9f911029d006462/0x5f78745f31657070.
> [ 43.115208] Last user: [<5f7272655f746b70>](0x5f7272655f746b70)
> [ 43.115214] 010: 70 70 65 31 5f 74 78 5f 70 6b 74 00 6b 6b 6b 6b ppe1_tx_pkt.kkkk
> [ 43.115217] 030: 70 70 65 31 5f 74 78 5f 70 6b 74 5f 6f 6b 00 6b ppe1_tx_pkt_ok.k
> [ 43.115218] Next obj: start=ffff801fb0b69098, len=80
> [ 43.115220] Redzone: 0x706d655f6f666966/0x9f911029d74e35b.
> [ 43.115229] Last user: [<ffff0000084b11b0>](acpi_os_release_object+0x28/0x38)
> [ 43.115231] 000: 74 79 00 6b 6b 6b 6b 6b 70 70 65 31 5f 74 78 5f ty.kkkkkppe1_tx_
> [ 43.115232] 010: 70 6b 74 5f 65 72 72 5f 63 73 75 6d 5f 66 61 69 pkt_err_csum_fai
>
> Signed-off-by: Timmy Li <lixiaoping3@huawei.com>
> ---
> Changelog:
>
> v1 -> v2:
> * Remove unnecessary parenthesis
Applied, thank you.
prev parent reply other threads:[~2017-05-02 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 2:46 Timmy Li
2017-05-02 19:08 ` David Miller [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=20170502.150832.1539345702174708842.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=huangdaode@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=lixiaoping3@huawei.com \
--cc=mbrugger@suse.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=yankejian@huawei.com \
--cc=yisen.zhuang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®