From patchwork Fri Sep 21 10:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Salisbury X-Patchwork-Id: 973008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Gpzv2Tpzz9sCc; Fri, 21 Sep 2018 20:02:19 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1g3IGK-0008QC-U5; Fri, 21 Sep 2018 10:02:12 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1g3IGJ-0008Pt-KK for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 10:02:11 +0000 Received: from 1.general.jsalisbury.us.vpn ([10.172.67.212] helo=salisbury) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1g3IGJ-0001Lt-8Y for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 10:02:11 +0000 Received: by salisbury (Postfix, from userid 1000) id B11747E0970; Fri, 21 Sep 2018 12:02:09 +0200 (CEST) From: Joseph Salisbury To: kernel-team@lists.ubuntu.com Subject: [SRU][Xenial][Bionic][PATCH 0/1] getxattr: use correct xattr length Date: Fri, 21 Sep 2018 12:02:08 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1789746 == SRU Justification == When running in a container with a user namespace, if you call getxattr with name = "system.posix_acl_access" and size % 8 != 4, then getxattr silently skips the user namespace fixup that it normally does resulting in un-fixed-up data being returned. This is caused by posix_acl_fix_xattr_to_user() being passed the total buffer size and not the actual size of the xattr as returned by vfs_getxattr(). This commit has already been applied to Cosmic master-next. == Fix == 82c9a927bc5d ("getxattr: use correct xattr length") == Regression Potential == Low. One liner that passes the actual length of the xattr as returned by vfs_getxattr() down. == Test Case == A test kernel was built with this patch and tested by the original bug reporter. The bug reporter states the test kernel resolved the bug. Christian Brauner (1): getxattr: use correct xattr length fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)