From: Ido Schimmel <idosch@idosch.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch,
horms@kernel.org, danieller@nvidia.com,
damodharam.ammepalli@broadcom.com,
andrew.gospodarek@broadcom.com, petrm@nvidia.com
Subject: Re: [PATCH net 1/2] ethtool: cmis_cdb: use correct rpl size in ethtool_cmis_module_poll()
Date: Thu, 3 Apr 2025 18:06:28 +0300 [thread overview]
Message-ID: <Z-6j9F_zF7pBGbOS@shredder> (raw)
In-Reply-To: <20250402183123.321036-2-michael.chan@broadcom.com>
On Wed, Apr 02, 2025 at 11:31:22AM -0700, Michael Chan wrote:
> From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
>
> rpl is passed as a pointer to ethtool_cmis_module_poll(), so the correct
> size of rpl is sizeof(*rpl) which should be just 1 byte. Using the
> pointer size instead can cause stack corruption:
>
> Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ethtool_cmis_wait_for_cond+0xf4/0x100
> CPU: 72 UID: 0 PID: 4440 Comm: kworker/72:2 Kdump: loaded Tainted: G OE 6.11.0 #24
> Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
> Hardware name: Dell Inc. PowerEdge R760/04GWWM, BIOS 1.6.6 09/20/2023
> Workqueue: events module_flash_fw_work
> Call Trace:
> <TASK>
> panic+0x339/0x360
> ? ethtool_cmis_wait_for_cond+0xf4/0x100
> ? __pfx_status_success+0x10/0x10
> ? __pfx_status_fail+0x10/0x10
> __stack_chk_fail+0x10/0x10
> ethtool_cmis_wait_for_cond+0xf4/0x100
> ethtool_cmis_cdb_execute_cmd+0x1fc/0x330
> ? __pfx_status_fail+0x10/0x10
> cmis_cdb_module_features_get+0x6d/0xd0
> ethtool_cmis_cdb_init+0x8a/0xd0
> ethtool_cmis_fw_update+0x46/0x1d0
> module_flash_fw_work+0x17/0xa0
> process_one_work+0x179/0x390
> worker_thread+0x239/0x340
> ? __pfx_worker_thread+0x10/0x10
> kthread+0xcc/0x100
> ? __pfx_kthread+0x10/0x10
> ret_from_fork+0x2d/0x50
> ? __pfx_kthread+0x10/0x10
> ret_from_fork_asm+0x1a/0x30
> </TASK>
>
> Fixes: a39c84d79625 ("ethtool: cmis_cdb: Add a layer for supporting CDB commands)
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
next prev parent reply other threads:[~2025-04-03 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 18:31 [PATCH net 0/2] ethtool: cmis fixes Michael Chan
2025-04-02 18:31 ` [PATCH net 1/2] ethtool: cmis_cdb: use correct rpl size in ethtool_cmis_module_poll() Michael Chan
2025-04-03 9:02 ` Simon Horman
2025-04-03 15:06 ` Ido Schimmel [this message]
2025-04-02 18:31 ` [PATCH net 2/2] ethtool: cmis: use u16 for calculated read_write_len_ext Michael Chan
2025-04-03 9:04 ` Simon Horman
2025-04-03 15:03 ` Ido Schimmel
2025-04-07 15:09 ` Damodharam Ammepalli
2025-04-07 16:23 ` Ido Schimmel
2025-04-07 18:03 ` Damodharam Ammepalli
2025-04-08 18:25 ` Michael Chan
2025-04-09 6:40 ` Ido Schimmel
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=Z-6j9F_zF7pBGbOS@shredder \
--to=idosch@idosch.org \
--cc=andrew.gospodarek@broadcom.com \
--cc=andrew@lunn.ch \
--cc=damodharam.ammepalli@broadcom.com \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.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.