From: James Carter <jwcart2@gmail.com>
To: "Christian Göttsche" <cgoettsche@seltendoof.de>
Cc: selinux@vger.kernel.org, "Christian Göttsche" <cgzones@googlemail.com>
Subject: Re: [PATCH 1/2] checkpolicy: free identifiers on invalid typebounds
Date: Thu, 4 Apr 2024 12:21:34 -0400 [thread overview]
Message-ID: <CAP+JOzQREoh7gKproPYZNYv3DcPUWddaJqK9bVrPWCiF55NP2A@mail.gmail.com> (raw)
In-Reply-To: <CAP+JOzSbXFWTTft7+pM+WueX+rx+SH9hJ6Y150QEdadYJC4i0g@mail.gmail.com>
On Mon, Apr 1, 2024 at 12:52 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Sat, Mar 30, 2024 at 9:35 AM Christian Göttsche
> <cgoettsche@seltendoof.de> wrote:
> >
> > From: Christian Göttsche <cgzones@googlemail.com>
> >
> > Free the two identifiers on an invalid typebounds in the error branch,
> > similar to the success branch.
> >
> > Reported-by: oss-fuzz (issue 67700)
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> For these two patches:
> Acked-by: James Carter <jwcart2@gmail.com>
>
These two patches have been merged.
Thanks,
Jim
> > ---
> > checkpolicy/policy_define.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
> > index 0cf938ea..92d1e5f2 100644
> > --- a/checkpolicy/policy_define.c
> > +++ b/checkpolicy/policy_define.c
> > @@ -1477,8 +1477,12 @@ int define_typebounds(void)
> > }
> >
> > while ((id = queue_remove(id_queue))) {
> > - if (define_typebounds_helper(bounds, id))
> > + if (define_typebounds_helper(bounds, id)) {
> > + free(bounds);
> > + free(id);
> > return -1;
> > + }
> > +
> > free(id);
> > }
> > free(bounds);
> > --
> > 2.43.0
> >
> >
prev parent reply other threads:[~2024-04-04 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 13:35 [PATCH 1/2] checkpolicy: free identifiers on invalid typebounds Christian Göttsche
2024-03-30 13:35 ` [PATCH 2/2] checkpolicy: update error diagnostic Christian Göttsche
2024-04-01 16:52 ` [PATCH 1/2] checkpolicy: free identifiers on invalid typebounds James Carter
2024-04-04 16:21 ` James Carter [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=CAP+JOzQREoh7gKproPYZNYv3DcPUWddaJqK9bVrPWCiF55NP2A@mail.gmail.com \
--to=jwcart2@gmail.com \
--cc=cgoettsche@seltendoof.de \
--cc=cgzones@googlemail.com \
--cc=selinux@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).