From: Jacob Keller <jacob.e.keller@intel.com>
To: <maxdev@posteo.de>, <netdev@vger.kernel.org>
Cc: <BenBE@geshi.org>, <github@crpykng.de>
Subject: Re: [PATCH] Ensure check of nlmsg length is performed before actual access
Date: Wed, 30 Nov 2022 14:17:42 -0800 [thread overview]
Message-ID: <a2240894-1fd0-3444-fd77-a1112ca2b85e@intel.com> (raw)
In-Reply-To: <4fe84646-eef5-1a33-5451-11a7800c3c9d@posteo.de>
On 11/30/2022 2:09 PM, maxdev@posteo.de wrote:
> During a brief code review we noticed that the length field expected
> inside the payload of the message is accessed before it is ensured that
> the payload is large enough to actually hold this field.
>
> The people mentioned in the commit message helped in the overall code
> review.
>
> Kind regards,
> Max
Hi,
Typically patches would be sent directly as plain text in the email
content, and not as an attachment.
As this is a fix, you would also typically determine what commit this
fixes, and add a "Fixes:" trailer to indicate this. You should also have
the subject include either "net" or "net-next" along with PATCH inside
the [].
As for the patch contents itself, Linux still follows C89 rules for
declarations, and you should leave "int len" at the top of the scope,
but assign it after the validation check as you do.
Thanks,
Jake
prev parent reply other threads:[~2022-11-30 22:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 22:09 [PATCH] Ensure check of nlmsg length is performed before actual access maxdev
2022-11-30 22:17 ` Jacob Keller [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=a2240894-1fd0-3444-fd77-a1112ca2b85e@intel.com \
--to=jacob.e.keller@intel.com \
--cc=BenBE@geshi.org \
--cc=github@crpykng.de \
--cc=maxdev@posteo.de \
--cc=netdev@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