From: David Howells <dhowells@redhat.com>
To: "Jerome Marchand" <jmarchan@redhat.com>
Cc: dhowells@redhat.com, keyrings@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] assoc_array: don't call compare_object() on a node
Date: Mon, 22 Feb 2016 16:37:38 +0000 [thread overview]
Message-ID: <12613.1456159058@warthog.procyon.org.uk> (raw)
In-Reply-To: <1456157620-20819-1-git-send-email-jmarchan@redhat.com>
Jerome Marchand <jmarchan@redhat.com> wrote:
> In assoc_array_insert_into_terminal_node(), we call the
> compare_object() method on all empty slots,
Ummm... That shouldn't happen - the:
if (!ptr) {
free_slot = i;
continue;
}
preceding the line you modified should cause the comparison to be skipped on a
slot if it's empty.
> even when they're not leaves, passing a pointer to an unexpected structure
> to compare_object().
Do you instead mean a metadata pointer rather than an empty slot?
> Currently it causes an out-of-bound read access in keyring_compare_object
> detected by KASan. The issue is easily reproduced with keyutils testsuite.
I don't see it. Did you modify the testsuite, or is it a matter of running it
often enough?
Also, can you include the oops output you get in the patch description,
please?
That said, I can see that there is probably an issue that your patch fixes -
but it's not quite the one you describe (see above).
David
next prev parent reply other threads:[~2016-02-22 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 16:13 [PATCH] assoc_array: don't call compare_object() on a node Jerome Marchand
2016-02-22 16:37 ` David Howells [this message]
2016-02-22 16:57 ` Jerome Marchand
2016-02-23 10:28 ` [PATCH V2] " Jerome Marchand
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=12613.1456159058@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jmarchan@redhat.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@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