All of lore.kernel.org
 help / color / mirror / Atom feed
From: rivaldihormat-debug <rivaldihormat@gmail.com>
To: intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org,
	rivaldihormat-debug <rivaldihormat@gmail.com>
Subject: [PATCH] i40e: fix integer overflow in i40e_dbg_command_write()
Date: Sat,  5 Sep 2026 15:31:55 +0000	[thread overview]
Message-ID: <20260905153155.2252-1-rivaldihormat@gmail.com> (raw)

Signed-off-by: rivaldihormat-debug <rivaldihormat@gmail.com>
---
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 0b52509cb14c..ca77636bf3de 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -722,6 +722,8 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
 	int cnt;
 
 	/* don't allow partial writes */
+	if (count == 0 || count > PAGE_SIZE)
+		return -EINVAL;
 	if (*ppos != 0)
 		return 0;
 
-- 
2.53.0


             reply	other threads:[~2026-09-05 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 15:31 rivaldihormat-debug [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-08 15:39 [PATCH] i40e: fix integer overflow in i40e_dbg_command_write() rivaldihormat-debug
2026-09-05 16:31 rivaldihormat-debug
2026-09-08 14:35 ` Loktionov, Aleksandr
2026-09-08 16:18   ` Rivaldi Hormat
2026-09-04  6:39 rivaldihormat-debug
2026-09-04  6:47 ` Greg Kroah-Hartman
2026-09-04  6:25 rivaldihormat-debug
2026-09-05 14:31 ` Paul Menzel

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=20260905153155.2252-1-rivaldihormat@gmail.com \
    --to=rivaldihormat@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=linux-kernel@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 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.