linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: kernel test robot <fengguang.wu@intel.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org, lkp@01.org
Subject: Re: [SUNRPC]  e22c8d3cf4: BUG:KASAN:use-after-free_in_r
Date: Tue, 20 Feb 2018 11:09:25 +1100	[thread overview]
Message-ID: <87371wldxm.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20180219163912.25h6tn5l2gwcx5nv@inn>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Tue, Feb 20 2018, kernel test robot wrote:

> FYI, we noticed the following commit (built with gcc-7):
>
> commit: e22c8d3cf4cd6307228c9946a670fa548c359611 ("SUNRPC: add side channel to use non-generic cred for rpc call.")
> url: https://github.com/0day-ci/linux/commits/NeilBrown/Remove-generic-rpc-credentials-and-associated-changed-V3/20180219-190836
> base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
>
> in testcase: boot
>
> on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 1G
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
> +-------------------------------+------------+------------+
> |                               | a79c51c9c3 | e22c8d3cf4 |
> +-------------------------------+------------+------------+
> | boot_successes                | 6          | 4          |
> | boot_failures                 | 0          | 4          |
> | BUG:KASAN:use-after-free_in_r | 0          | 4          |
> +-------------------------------+------------+------------+
>
>
>
> [   66.551598] BUG: KASAN: use-after-free in rpc_free_task+0x5e/0x86
> [   66.552963] Read of size 8 at addr ffff8800093e93a8 by task kworker/0:3/201

Thanks.
The patch had

        rpc_release_calldata(task->tk_ops, task->tk_calldata);
+       put_rpccred(task->tk_op_cred);

It should have had

+       put_rpccred(task->tk_op_cred);
        rpc_release_calldata(task->tk_ops, task->tk_calldata);

as the rpc_release_calldata might free the task.

I'll send a revised patch.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

           reply	other threads:[~2018-02-20  0:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20180219163912.25h6tn5l2gwcx5nv@inn>]

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=87371wldxm.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=anna.schumaker@netapp.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=trond.myklebust@primarydata.com \
    /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).