Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp645153ybl; Tue, 7 Jan 2020 12:28:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxUIQJUIFq1AsdRBB3mup/JA2EAhL1qOC5OWBFKS9dhlP1MyexQvsyD8VQguFOZWaCajO0x X-Received: by 2002:a9d:6211:: with SMTP id g17mr1528425otj.168.1578428928844; Tue, 07 Jan 2020 12:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578428928; cv=none; d=google.com; s=arc-20160816; b=w3Z74rpCmvzuS8ef6eC+wZrWFJtrOrHipwLtIBx/HjE4OtJuTbGPe94Sii0rTi+Vad QTVWVKzJGjmtIr028wI0OxOXQ9ChcCUceOkKCxxJh4q+j8PBteElDvWk9UevvsudDPxf l3uhQweQ/7ueaSf0ba0OmDBRNhIbsJ2JmkdVpA+k8h7wTr4VUWcyofyfAWTHTAuKJJ7l rT/A+ERA1IcTHiHfUL277JyvvC4BtvOYMuTmAKnlKXuJ26mqazAsYyYsqUiGbud+Pf+s qcQNrgTe4Shy1+5Pe4RaAS1p0Af2aueWjVZt1gpigB6C9w87V08QaJgcntyHKPYewW1E 4kgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=Wa+d80P+RfrGnI4IfyeLDhsI/lTLFLMKR0dCVdK36FM=; b=DphJWkYDE/ioT5uipvQn8uUh8DuXygEeNVTEnS3vurUpwiy+UeiNVHzvlCZ8drG+Mb Kluqu3vXRT4A1/BYP7teUGs/0DVA//je42C2/+yQDOP7KsvBi/tmBNtDURYxVJe5+Wzj wistRXXBdH2PUjdydiYG7XS/aZpzzaA7d8+Fwm480omhudLW1w904e5cSIaySDlbYFsL s8xxvrqyMRZe0VTC4QORQ3rm/rFWfl3vx/sTQOlLKZowmP5oHUhVyfAmNLXJ0OpIzA6s ErqWMnrHSmRiacF2+k1kBBXQmH6+kbPwpR7Kel4/aiuFPJVGu5DbCxX+rp5osOUbR4Zu pXvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12si646652otr.183.2020.01.07.12.28.36; Tue, 07 Jan 2020 12:28:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbgAGU1i (ORCPT + 99 others); Tue, 7 Jan 2020 15:27:38 -0500 Received: from mga01.intel.com ([192.55.52.88]:5305 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728451AbgAGU1i (ORCPT ); Tue, 7 Jan 2020 15:27:38 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2020 12:27:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,407,1571727600"; d="scan'208";a="222717999" Received: from tstruk-mobl1.jf.intel.com (HELO [10.7.196.67]) ([10.7.196.67]) by orsmga006.jf.intel.com with ESMTP; 07 Jan 2020 12:27:37 -0800 Subject: Re: Bad usercopy from tpm after d23d12484307 ("tpm: fix invalid locking in NONBLOCKING mode") To: Laura Abbott , Jarkko Sakkinen Cc: "linux-integrity@vger.kernel.org" , Linux Kernel Mailing List , Kees Cook References: From: Tadeusz Struk Autocrypt: addr=tadeusz.struk@intel.com; keydata= mQGNBF2okUMBDADGYZuwqK87k717uEyQ5hqo9X9ICnzpPt38ekB634MdtBwdK8KAFRWIpnT9 fb5bt/AFgGc1gke/Nr8PFsFcRiNTDuWpwO/zJdWWp+fdnB9dKI0usYY9+Y5Q3lhBeiBN7mDK fAoFjyeufKzY3pOM9Gy6FvGQjDyLm2H5siW0IKAsMjAiQ35qI7hednM2XECHqewt4yzxvPZr LpgpFvR43nJBUGULGPWqv0usVircd1bBJ4D24j/kaYmuDeyex/HdqTV8sWBx3NFFKtyZB7FV EPekbHIxaRxg3kgZzCKXrwoufLR5ErGO/oqJmGjuCMWp14iZ0mtN4BzYdhzqHmtJhc8/nSwV NIZUF+JpMk/KpYcPlpmMzBcLKHkAhEvIEoynKCcFHqNUjeu+tqL4Nc6Wl36T2EQw3u9hDk4Y uX4ZGe6BzADl8Sphgyld99I4jAeoEzSCbWnqS411iVPXyxfe+46zuW3ORncxNoyy3EqGu8m5 347fgFADQpc9+jdc1qFcxncAEQEAAbQnVGFkZXVzeiBTdHJ1ayA8dGFkZXVzei5zdHJ1a0Bp bnRlbC5jb20+iQHUBBMBCAA+FiEE91vcGmaCEzGCRUztOkAW4c1UqhwFAl2okUcCGwMFCQHh M4AFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQOkAW4c1UqhwVZQv/dTaTLe1s6xFyAkYJ aK8IqKOYo2s29bTDoeul7U2WFivgryGRX3mNblMfV6lwwRcNfjSF+gOVrT6+N1l2vrDmqtPG ywKjrL18C7TssAxj7oIDSdRCHbIRjHs6N2jmeg4MPOfBHI3saeatBlDJAVfDMLIey412agTV kuVOGkPvMaqB9vh9dZhLXdiRy8Hb4mHvEDR3w5YOGHz0dPkH97WS3y28b9OOLcXShieCW/cJ vRpWVI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rVUiiof en/LmOP4UBVPxRJ20UeFOD3XcwQerS0r4LEK2Zpl/lB7WbGSCZjoVq9xhv5i+9Z04KvVkTCY T/vfPu+7KPf+gxGMZZqi+mILWBzCbhOa25HOjeJ780zGDQa05DF6WWepIlNYoiaYeqwhcmWP gwizcH5TjTP7SF96/2USKmZCsgKKiVy4a9yHyafeDxCa6NwL1wVRaCqJhdtjgfGrcSx0u++F H5Vo0zSBk5Nx0fx2HT16roAnfoOj4wLa/0xVtt+9XXdcoueQwO4imuUeR1Spm1Yni1oBuaR3 yvcQkH/25MiQZ3/8hU+0Tpfy9SPQyBxrtguvPBPfRg== Message-ID: Date: Tue, 7 Jan 2020 12:27:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/7/20 10:51 AM, Laura Abbott wrote: > I think this is related to d23d12484307 ("tpm: fix invalid locking in > NONBLOCKING mode") > Specifically, if tpm_try_get_ops fails I don't think we should be > putting the error > code in priv->response_length since tpm_common_read doesn't seem to > account for > negative errno values. > > I don't have a reproducer since this was just what was reported to > Fedora's bug > reporter but both reports happened after that commit landed in stable. Thank you for the report Laura. Fix is on the way. -- Tadeusz