Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #60053

Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Andrew Shadura <andrewsh@debian.org>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec
Date Tue, 23 Jan 2018 14:00:01 +0100
Message-ID <vb6lb-2pQ-5@gated-at.bofh.it> (permalink)
X-Original-To Debian Bug Tracking System <submit@bugs.debian.org>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Jan 23 12:51:13 2018
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -4.1
Reply-To Andrew Shadura <andrewsh@debian.org>, 888106@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian kernel team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message report 888106
X-Debian-Pr-Package initramfs-tools
X-Debian-Pr-Source initramfs-tools
X-Spam-Bayes score:0.0000 Tokens: new, 14; hammy, 140; neutral, 56; spammy, 0. spammytokens: hammytokens:0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug, 0.000-+--H*UA:reportbug, 0.000-+--Maintainer
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=shadura.me; s=a; h=Date:Message-ID:Subject:To:From:Content-Transfer-Encoding: MIME-Version:Content-Type:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=O97BWFf/imnCqcPgo7S5ab62QnB/iNeyS86sUxUhFSU=; b=Dmdts48P6vLUlKKsbxiWgsaPHe 7r/62lHBoVc8Dpt83E80rv7o7CQ0C+aJ3NGPJq2yc0sP2WRNsfP6HkyUFTqUSxUCT9SkfWao1P+YI 3X+3fFzC9zkA18M7jXGbC7WXQG7TvLmjADvi0kUHI2eRFnCjLVucnNTn8B1mXbrH3iic=;
Content-Type text/plain; charset="utf-8"
MIME-Version 1.0
Content-Transfer-Encoding base64
X-Mailer reportbug 7.1.7ubuntu1
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1435363
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 19
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 23 Jan 2018 13:49:30 +0100
X-Original-Message-ID <151671177015.20990.2785941289219470893.reportbug@nuevo>
Xref csiph.com linux.debian.bugs.dist:877037 linux.debian.kernel:60053

Cross-posted to 2 groups.

Show key headers only | View raw


Package: initramfs-tools
Version: 0.130
Severity: minor

Dear Maintainer,

We're working on a minimalist build of a Debian derivative which doesn't
include bash, and we ran into an situation in which due to a human error
the system didn't have a working ldd. This wasn't detected during an
image build process as mkinitramfs happily ignored ldd not working
(while being present and being an executable), and proceeded creating
a broken initramfs. In hook-functions, copy_exec does the following:

    # Copy the dependant libraries
    for x in $(ldd "${src}" 2>/dev/null | sed -e …)
    do
    done

The return code of ldd is not handled at all. Should ldd fail for any
reason, this failure will be ignored.

I tried to write a patch, but I couldn't come up with an elegant
solution which would cover cases other than just a wrong hashbang in
ldd :)

Maybe something like https://www.spinics.net/lists/dash/msg00165.html
can be used, but it's up to you to introduce hacks like that into the
code.

Thanks in advance.

-- 
Cheers,
  Andrew

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec Andrew Shadura <andrewsh@debian.org> - 2018-01-23 14:00 +0100
  Bug#888106: initramfs-tools: mkinitramfs should fail when ldd fails in copy_exec Trek <trek00@inbox.ru> - 2018-12-21 16:00 +0100

csiph-web