From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8MPVEUIYVmP9ewEAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 06:44:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2DnDEUIYVmMe5AAA9RJhRA (envelope-from ) for ; Mon, 24 Oct 2022 06:44:50 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0AE9336CE5 for ; Mon, 24 Oct 2022 06:44:50 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omlSY-0004fe-Ng for larch@yhetil.org; Sun, 23 Oct 2022 20:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omXIx-0000SB-0v for bug-guix@gnu.org; Sun, 23 Oct 2022 05:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omXIw-0006K7-Np for bug-guix@gnu.org; Sun, 23 Oct 2022 05:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omXIw-00024p-7t for bug-guix@gnu.org; Sun, 23 Oct 2022 05:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58733: installer: coredump generation Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 23 Oct 2022 09:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58733 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 58733@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16665173887939 (code B ref -1); Sun, 23 Oct 2022 09:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2022 09:29:48 +0000 Received: from localhost ([127.0.0.1]:42856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omXIi-00023x-EY for submit@debbugs.gnu.org; Sun, 23 Oct 2022 05:29:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:35510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omXIc-00023j-FG for submit@debbugs.gnu.org; Sun, 23 Oct 2022 05:29:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omXIb-0000Ps-SL for bug-guix@gnu.org; Sun, 23 Oct 2022 05:29:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omXIb-0006C8-KF for bug-guix@gnu.org; Sun, 23 Oct 2022 05:29:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=kwxeQXrYVri6KgOdit3xM0x5Ph7HsAfh1bs/ig6vV4c=; b=C/pbZtsYmB61KT ApQo8ORih1E5iAaZ7bhInTDs+N1xuyrXpYUda1dCXabIyLG4iVIAHGTuTtGOu/upk6ElnNCDHWo2n tu6izrOFBDyNTBbR+u5bzvyBF1vgPzes/Xg+bkdKsq8IQYpJqnrvZlIKQSOuxxtVGBnr+/8mq8C/C qN4KbMOoJ4rimD7bKuSC8fV7jGYpZhWNH8AT2/7oZn/YayNb3LWFmMlctEbbSg8sC7rS6C7YelDdw fA1NtRJrX05jiTRxpLkh60ooA9oR6AV5gxbsqxIBl5LhsG5woG0zsuGKhQJ+ycaVrsqp3supbdMOI 7qDb1to2nCIeUnTI3H2w==; Received: from 2a02-8429-81d2-3d01-94c9-8097-ea5c-2775.rev.sfr.net ([2a02:8429:81d2:3d01:94c9:8097:ea5c:2775] helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omXIa-0003ux-1r for bug-guix@gnu.org; Sun, 23 Oct 2022 05:29:41 -0400 From: Mathieu Othacehe Date: Sun, 23 Oct 2022 11:29:37 +0200 Message-ID: <87o7u228hq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666586690; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=kwxeQXrYVri6KgOdit3xM0x5Ph7HsAfh1bs/ig6vV4c=; b=Cenekc21FycxKWmOrbEaQGe+8VP7jAEsMKIYSfW0458Hw9Kw9saeJtHtnQqLVVoe/jlEj/ mVD3pTAtFxcxxzKBQ9hjCXBKFXDs/HrDV6dNEgNwtq6vcLnuVcdYUSAiDasw2Co5VtFf4P tEiIzFf+4Uv68Gf1egPzVqRm9S6CFfoqRVog2C3IGsmzbAHsNEYeUu9jUgaGApg6kiTuPo mwIP6G0UpLAjcZyEIbuZaqsM2GShQ+P0xUWdWdjS1A2D6mSsaOrkMxK/CcHQWqNnNM49LL R2py6A9xWVcdBfaYQwN/qdyHZ+uqTpQiu4MzxA1bh2CZEm2DvhxeW0UANvAnxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666586690; a=rsa-sha256; cv=none; b=bK3dikijfC2rWyXl/LTmO8h9UT+xzEx3CxfBTQMy2W8T/VdJWVIW+gphO8NcBnabDnYwlg JTpHqJFGaZJPqi2f0zvtfZOnYH42Q/cJVVTS/Jnv1O6xz0uqXvkvlAysXX+MuL2mYZhhi7 DtjnbL6Ax56mfb4jrZ1jtKRdwJhATyib6GGPoj0C/xW4o/y5Lw3y4DFILZU8hVxHmh0vEr Br7xOLVuLgNQhw2ErtzhTWGCRuItuKBwIE8bqEbTjbZiUujCvnZT4cShr3d1t674BbJNT3 m2bN68tyzBMvBgQCqaiDBa4jGpCM9EL4A9nrK8jsBjEI0rDYwFyO+cw0ZgEmHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="C/pbZtsY"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="C/pbZtsY"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0AE9336CE5 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: wqLTEup+7rTu Hello, This installer sometimes sadly segfaults, most of the time in libparted. To be able to catch this coredump[1], I ran those commands: --8<---------------cut here---------------start------------->8--- echo /tmp/core > /proc/sys/kernel/core_pattern prlimit --core=unlimited --pid=1234 --8<---------------cut here---------------end--------------->8--- The coredump I obtained did not seem to be exploitable, despite the fact that it weights 155MB: --8<---------------cut here---------------start------------->8--- mathieu@meije ~/guix [env]$ gdb /gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/bin/guile core ... BFD: warning: /home/mathieu/guix/core has a segment extending past end of file warning: core file may not match specified executable file. ... Failed to read a valid object file image from memory. Core was generated by `/gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/bin/guile --no-auto-com'. --8<---------------cut here---------------end--------------->8--- So I decided to adopt a new strategy and ran: --8<---------------cut here---------------start------------->8--- $ gdb $ attach 1234 ... $ gcore --8<---------------cut here---------------end--------------->8--- to get a viable core dump, and those commands to exploit it (thanks Josselin!): --8<---------------cut here---------------start------------->8--- (gdb) info sharedlibrary >From To Syms Read Shared Object Library ... 0x00007f892c59c850 0x00007f892c5d3d0b Yes (*) /gnu/store/qz7qqrhgcs3ixv8f1k30gwiqr1prm7qs-parted-3.5/lib/libparted.so (gdb) add-symbol-file /gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so 0x00007f892c59c850 add symbol table from file "/gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so" at .text_addr = 0x7f892c59c850 (y or n) y Reading symbols from /gnu/store/b0ymz7vjfkcvhbci49q5yk1fi0l9lq49-parted-3.5/lib/libparted.so... (gdb) bt #0 linux_destroy (dev=0x1dc89e0) at arch/linux.c:1615 #1 0x00007f8941aecd37 in ?? () from /gnu/store/1jgcbdzx2ss6xv59w55g3kr3x4935dfb-guile-3.0.8/lib/libguile-3.0.so.1 ... --8<---------------cut here---------------end--------------->8--- I think that it would be great if we could enable coredump generation from the installer. This way, when a crash occurs and the installer restarts, it would notice that there is an existing coredump in say /tmp/coredump_xxx and propose to upload it using the existing dump mechanism. Thanks, Mathieu [1]: https://issues.guix.gnu.org/58732