Re: [SUNRPC] e22c8d3cf4: BUG:KASAN:use-after-free_in_r

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux