From: Anthony PERARD <anthony.perard@cloud.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Ross Lagerwall <ross.lagerwall@citrix.com>
Subject: Re: [PATCH v4 1/4] xen-livepatch: fix parameter name parsing
Date: Wed, 24 Apr 2024 16:29:53 +0100 [thread overview]
Message-ID: <a72678d3-3aab-49b6-b0d7-6f00328b7e7f@perard> (raw)
In-Reply-To: <20240424081957.34326-2-roger.pau@citrix.com>
On Wed, Apr 24, 2024 at 10:19:54AM +0200, Roger Pau Monne wrote:
> It's incorrect to restrict strncmp to the length of the command line input
> parameter, as then a user passing a rune like:
>
> % xen-livepatch up foo.livepatch
>
> Would match against the "upload" command, because the string comparison has
> been truncated to the length of the input argument. Use strcmp instead which
> doesn't truncate. Otherwise in order to keep using strncmp we would need to
> also check strings are of the same length before doing the comparison.
>
> Fixes: 05bb8afedede ('xen-xsplice: Tool to manipulate xsplice payloads')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2024-04-24 15:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 8:19 [PATCH v4 0/4] livepatch: minor bug fixes and improvements Roger Pau Monne
2024-04-24 8:19 ` [PATCH v4 1/4] xen-livepatch: fix parameter name parsing Roger Pau Monne
2024-04-24 15:29 ` Anthony PERARD [this message]
2024-04-25 14:33 ` Ross Lagerwall
2024-04-24 8:19 ` [PATCH v4 2/4] livepatch: introduce --force option Roger Pau Monne
2024-04-26 6:41 ` Jan Beulich
2024-04-26 7:15 ` Roger Pau Monné
2024-04-24 8:19 ` [PATCH v4 3/4] livepatch: refuse to resolve symbols that belong to init sections Roger Pau Monne
2024-04-25 11:46 ` Roger Pau Monné
2024-04-24 8:19 ` [PATCH v4 4/4] x86/livepatch: perform sanity checks on the payload exception table contents Roger Pau Monne
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=a72678d3-3aab-49b6-b0d7-6f00328b7e7f@perard \
--to=anthony.perard@cloud.com \
--cc=roger.pau@citrix.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xenproject.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).