From: Stefano Brivio <sbrivio@redhat.com>
To: Stas Sergeev <stsp2@yandex.ru>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] tap: fix uses of l3_len in tap4_handler()
Date: Thu, 7 Sep 2023 17:45:19 +0200 [thread overview]
Message-ID: <20230907174519.08eb598e@elisabeth> (raw)
In-Reply-To: <20230829164406.594036-1-stsp2@yandex.ru>
On Tue, 29 Aug 2023 21:44:06 +0500
Stas Sergeev <stsp2@yandex.ru> wrote:
> l3_len was calculated from the ethernet frame size, and it
> was assumed to be equal to the length stored in an IP packet.
> But if the ethernet frame is padded, then l3_len calculated
> that way can only be used as a bound check to validate the
> length stored in an IP header. It should not be used for
> calculating the l4_len.
>
> This patch makes sure the small padded ethernet frames are
> properly processed, by trusting the length stored in an IP
> header.
>
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
Applied, thanks!
--
Stefano
prev parent reply other threads:[~2023-09-07 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 16:44 [PATCH] tap: fix uses of l3_len in tap4_handler() Stas Sergeev
2023-08-30 1:22 ` David Gibson
2023-09-07 15:45 ` Stefano Brivio [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=20230907174519.08eb598e@elisabeth \
--to=sbrivio@redhat.com \
--cc=passt-dev@passt.top \
--cc=stsp2@yandex.ru \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).