Message ID | 20180303005923.152761-1-ebiggers3@gmail.com |
---|---|
Headers | show
Return-Path: <linux-ext4-owner@vger.kernel.org> X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E87pVlHh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ztSW52HQ8z9s92 for <patchwork-incoming@ozlabs.org>; Sat, 3 Mar 2018 11:59:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964831AbeCCA7o (ORCPT <rfc822;patchwork-incoming@ozlabs.org>); Fri, 2 Mar 2018 19:59:44 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:52474 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964827AbeCCA7m (ORCPT <rfc822; linux-ext4@vger.kernel.org>); Fri, 2 Mar 2018 19:59:42 -0500 Received: by mail-it0-f65.google.com with SMTP id k135so3626447ite.2 for <linux-ext4@vger.kernel.org>; Fri, 02 Mar 2018 16:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Q0i+9DXv7WB1AgQ3riTOLKt7dIDWAvtC5Qlre4qHmWk=; b=E87pVlHhsLunbujq5jx7HQJ4uZvkgkQSqgfpzU/VwOjraIX83Qw/Pm9ElVxF0vDBLZ QR4cl+p7FfqgHH4LzWKd64ErMl0fMvvYdQYH98yl0Z//M4orev6ZdwyySd5LdvIQ8OcS CYFQr82G70hYD3JCy+HVfYpSIUxhSS/1uBWkQCYZ6zXGziA76AxBMytC4HlJNOK97yFO eF7wrbxWKX4qn4xL61Uf9X6rinTsMyZJJEuamgedPrMLsmNtf8WTW0U78O/5Rk4AP0Dt 3CMmqJ1T5sSIk2k/QRtqW4usdONfdQuoNcvbppP3VSrAEQQe6McF4x+tKZkTJVNixfWG AK4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Q0i+9DXv7WB1AgQ3riTOLKt7dIDWAvtC5Qlre4qHmWk=; b=jAmnQzIM8glTIrNSV0DPsYXtQ7lOJW+gp59qUgEQO5krUBEwMVm/8cMR6hcoPFGG9V OiV8XJIQfVAmGf2dMLVdKmz033OOtIygZMWiAc+YV7kaBdSjxlFyKHRVFnutOKrvK4V4 u/3LvmaTjYUawFCb97DpX+GfJmq6OkL47ZLCbKtBbxviwCgaZU1WmqbOcXbKXFV8JqbU af9svPRNlGe4KUttZYlRw2K37SMypE5CcR4zoUROR9Y15r19jJByXd5YQSefZd9LqzWP QFhEItkmoQhGt1KfXCZ8Fjf3f5VU4sgN7UrHiY9/QZgkSK4yqJgby4zzn1IqZeYqQ269 /+YA== X-Gm-Message-State: AElRT7FRh/zaYJqsTuvetKOfamd8RGn0gRlBhDA78bChHdwSlkW8uacW b02TwmNIchPUi1F7XPj05N+BXIHq X-Google-Smtp-Source: AG47ELtRl6WU4lvaNRAxTZAUVF0uDPiD0Y9GqYX8TyzFHeF23D+PLPFtDTiB+fGW7NL5I5rTRjUBWw== X-Received: by 10.36.214.4 with SMTP id o4mr5015158itg.61.1520038781517; Fri, 02 Mar 2018 16:59:41 -0800 (PST) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id p135sm1382972itg.44.2018.03.02.16.59.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 16:59:40 -0800 (PST) From: Eric Biggers <ebiggers3@gmail.com> To: linux-ext4@vger.kernel.org Cc: Eric Biggers <ebiggers@google.com> Subject: [PATCH 00/10] e2fsprogs: symlink fixes Date: Fri, 2 Mar 2018 16:59:13 -0800 Message-Id: <20180303005923.152761-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.16.2.395.g2e18187dfd-goog Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: <linux-ext4.vger.kernel.org> X-Mailing-List: linux-ext4@vger.kernel.org |
Series |
e2fsprogs: symlink fixes
|
expand
|
From: Eric Biggers <ebiggers@google.com> Hello, Here's a collection of fixes for symlink handling in e2fsprogs. This started out as a fix for e2fsck's handling encrypted symlinks, but it turned into several fixes for e2fsck's detection of bad symlinks (including unencrypted ones) as well as a couple fixes for creating symlinks via libext2fs. Please pay close attention to "e2fsck: validate the targets of extent-based symlinks" and "e2fsck: require that fast symlinks don't have EXT4_EXTENTS_FL", but I think they are safe. Eric Biggers (10): libext2fs: forbid creating symlinks using entire block libext2fs: make sure the system.data xattr gets created e2fsck: fix reading fscrypt_symlink_data.len e2fsck: validate that fscrypt_symlink_data.len is not too large e2fsck: validate fscrypt_symlink_data.len for fast symlinks too e2fsck: require i_size == fscrypt_symlink_data.len + 2 e2fsck: drop redundant checks of symlink i_size e2fsck: validate the targets of extent-based symlinks e2fsck: require that fast symlinks don't have EXT4_EXTENTS_FL tests: test e2fsck of bad symlinks e2fsck/pass1.c | 98 ++++++++++++------------ lib/ext2fs/inline_data.c | 50 ++++++------- lib/ext2fs/symlink.c | 15 ++-- tests/f_badsymlinks2/expect.1 | 114 ++++++++++++++++++++++++++++ tests/f_badsymlinks2/expect.2 | 7 ++ tests/f_badsymlinks2/image.gz | Bin 0 -> 14302 bytes tests/f_badsymlinks2/mkimage.sh | 127 ++++++++++++++++++++++++++++++++ tests/f_badsymlinks2/name | 1 + tests/f_create_symlinks/expect | 46 +++++++----- tests/f_create_symlinks/script | 8 +- 10 files changed, 365 insertions(+), 101 deletions(-) create mode 100644 tests/f_badsymlinks2/expect.1 create mode 100644 tests/f_badsymlinks2/expect.2 create mode 100644 tests/f_badsymlinks2/image.gz create mode 100755 tests/f_badsymlinks2/mkimage.sh create mode 100644 tests/f_badsymlinks2/name