xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Julien Grall <julien@xen.org>, xen-devel@lists.xenproject.org
Cc: raphning@amazon.co.uk, iwj@xenproject.org,
	Julien Grall <jgrall@amazon.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH for-4.15 2/5] tools/xenstored: Avoid unnecessary talloc_strdup() in do_lu_start()
Date: Fri, 26 Feb 2021 08:01:09 +0100	[thread overview]
Message-ID: <1de2c7a3-946b-e6cb-253b-c8d2b9b21843@suse.com> (raw)
In-Reply-To: <20210225174131.10115-3-julien@xen.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 705 bytes --]

On 25.02.21 18:41, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> At the moment, the return of talloc_strdup() is not checked. This means
> we may dereference a NULL pointer if the allocation failed.
> 
> However, it is pointless to allocate the memory as send_reply() will
> copy the data to a different buffer. So drop the use of talloc_strdup().
> 
> This bug was discovered and resolved using Coverity Static Analysis
> Security Testing (SAST) by Synopsys, Inc.
> 
> Fixes: af216a99fb4a ("tools/xenstore: add the basic framework for doing the live update")
> Signed-off-by: Julien Grall <jgrall@amazon.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-02-26  7:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 17:41 [PATCH for-4.15 0/5] xenstore: Address coverity issues in the LiveUpdate code Julien Grall
2021-02-25 17:41 ` [PATCH for-4.15 1/5] tools/xenstored: Avoid unnecessary talloc_strdup() in do_control_lu() Julien Grall
2021-02-26  7:00   ` Jürgen Groß
2021-02-25 17:41 ` [PATCH for-4.15 2/5] tools/xenstored: Avoid unnecessary talloc_strdup() in do_lu_start() Julien Grall
2021-02-26  7:01   ` Jürgen Groß [this message]
2021-02-25 17:41 ` [PATCH for-4.15 3/5] tools/xenstored: control: Store the save filename in lu_dump_state Julien Grall
2021-02-26  7:04   ` Jürgen Groß
2021-02-25 17:41 ` [PATCH for-4.15 4/5] tools/xenstore-control: Don't leak buf in live_update_start() Julien Grall
2021-02-26  7:06   ` Jürgen Groß
2021-02-25 17:41 ` [PATCH for-4.15 5/5] tools/xenstored: Silence coverity when using xs_state_* structures Julien Grall
2021-02-25 17:47   ` Andrew Cooper
2021-02-25 17:53     ` Julien Grall
2021-02-26  7:10   ` Jürgen Groß
2021-02-26  8:57     ` Julien Grall
2021-02-26  9:15       ` Jürgen Groß
2021-02-25 17:54 ` [PATCH for-4.15 0/5] xenstore: Address coverity issues in the LiveUpdate code Ian Jackson
2021-02-25 17:57   ` Julien Grall
2021-02-25 18:01     ` Ian Jackson

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=1de2c7a3-946b-e6cb-253b-c8d2b9b21843@suse.com \
    --to=jgross@suse.com \
    --cc=iwj@xenproject.org \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --cc=raphning@amazon.co.uk \
    --cc=wl@xen.org \
    --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 NNTP newsgroup(s).