lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200222190201.GC26320@sasha-vm>
Date:   Sat, 22 Feb 2020 14:02:01 -0500
From:   Sasha Levin <sashal@...nel.org>
To:     Pavel Machek <pavel@...x.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Dan Carpenter <dan.carpenter@...cle.com>,
        "J. Bruce Fields" <bfields@...hat.com>
Subject: Re: [PATCH 4.19 011/191] nfsd4: avoid NULL deference on strange COPY
 compounds

On Fri, Feb 21, 2020 at 11:51:04AM +0100, Pavel Machek wrote:
>Hi!
>
>> With cross-server COPY we've introduced the possibility that the current
>> or saved filehandle might not have fh_dentry/fh_export filled in, but we
>> missed a place that assumed it was.  I think this could be triggered by
>> a compound like:
>>
>> 	PUTFH(foreign filehandle)
>> 	GETATTR
>> 	SAVEFH
>> 	COPY
>>
>> First, check_if_stalefh_allowed sets no_verify on the first (PUTFH) op.
>> Then op_func = nfsd4_putfh runs and leaves current_fh->fh_export NULL.
>> need_wrongsec_check returns true, since this PUTFH has OP_IS_PUTFH_LIKE
>> set and GETATTR does not have OP_HANDLES_WRONGSEC set.
>>
>> We should probably also consider tightening the checks in
>> check_if_stalefh_allowed and double-checking that we don't assume the
>> filehandle is verified elsewhere in the compound.  But I think this
>> fixes the immediate issue.
>>
>> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
>> Fixes: 4e48f1cccab3 "NFSD: allow inter server COPY to have... "
>
>AFAICT 4e48f1cccab3 "NFSD: allow inter server COPY to have... " is not
>part of 4.19 series, so this should not be needed in 4.19.

Not only 4e48f1cccab3 isn't in 4.19, it isn't in any tree! :)

Looks like an error in the patch, I'll drop this commit from everywhere.

-- 
Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ