From: Mimi Zohar <zohar@linux.ibm.com>
To: Bruno Meneguele <bmeneg@redhat.com>, linux-integrity@vger.kernel.org
Cc: Petr Vorel <pvorel@suse.cz>, Vitaly Chikunov <vt@altlinux.org>
Subject: Re: [PATCH 3/3] ima-evm-utils: fix overflow on printing boot_aggregate
Date: Wed, 15 Jul 2020 18:30:07 -0400 [thread overview]
Message-ID: <1594852207.12900.350.camel@linux.ibm.com> (raw)
In-Reply-To: <20200715213906.194041-4-bmeneg@redhat.com>
On Wed, 2020-07-15 at 18:39 -0300, Bruno Meneguele wrote:
> diff --git a/src/evmctl.c b/src/evmctl.c
> index 2f5bd52..2bd37c2 100644
> --- a/src/evmctl.c
> +++ b/src/evmctl.c
> @@ -2252,7 +2252,8 @@ static int cmd_ima_bootaggr(struct command *cmd)
> bootaggr_len += strlen(tpm_banks[i].algo_name) + 1;
> bootaggr_len += (tpm_banks[i].digest_size * 2) + 1;
> }
> - bootaggr = malloc(bootaggr_len);
> + /* Make room for the leading \0 */
^Trailing null
Mimi
> + bootaggr = malloc(bootaggr_len + 1);
>
> /*
> * Calculate and convert the per TPM 2.0 PCR bank algorithm
next prev parent reply other threads:[~2020-07-15 22:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 21:39 [PATCH 0/3] ima-evm-utils: miscellanous bug fixes Bruno Meneguele
2020-07-15 21:39 ` [PATCH 1/3] ima-evm-utils: fix empty label at end of function Bruno Meneguele
2020-07-15 21:39 ` [PATCH 2/3] ima-evm-utils: fix memory leak in case of error Bruno Meneguele
2020-07-15 21:39 ` [PATCH 3/3] ima-evm-utils: fix overflow on printing boot_aggregate Bruno Meneguele
2020-07-15 22:30 ` Mimi Zohar [this message]
2020-07-15 22:33 ` Bruno Meneguele
2020-07-15 22:30 ` [PATCH 0/3] ima-evm-utils: miscellanous bug fixes Mimi Zohar
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=1594852207.12900.350.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=bmeneg@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=pvorel@suse.cz \
--cc=vt@altlinux.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).