Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240104144811.GO1427497@port70.net>
Date: Thu, 4 Jan 2024 15:48:11 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: Cody Wetzel <codyawetzel@...il.com>
Cc: Natanael Copa <ncopa@...inelinux.org>, musl@...ts.openwall.com,
	Markus Wichmann <nullplan@....net>
Subject: Re: Segmentation fault musl 1.2.4

* Cody Wetzel <codyawetzel@...il.com> [2024-01-03 11:20:29 -0600]:
> Hello musl team,
> 
> I tried getting a core dump but I'm not sure if I'm doing something wrong...
> 
> / # cat /proc/sys/kernel/core_pattern/tmp/core-%e-%s-%u-%g-%p-%t/ #
> apk upgrade busybox
> --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/main
> --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/communityfetch
> https://dl-cdn.alpinelinux.org/alpine/v3.18/community/armv7/APKINDEX.tar.gzfetch
> https://dl-cdn.alpinelinux.org/alpine/v3.18/main/armv7/APKINDEX.tar.gzfetch
> https://dl-cdn.alpinelinux.org/alpine/v3.17/main/armv7/APKINDEX.tar.gzfetch
> https://dl-cdn.alpinelinux.org/alpine/v3.17/community/armv7/APKINDEX.tar.gz(1/3)
> Upgrading busybox (1.35.0-r29 -> 1.36.1-r5)Executing
> busybox-1.36.1-r5.post-upgrade(2/3) Upgrading busybox-binsh
> (1.35.0-r29 -> 1.36.1-r5)(3/3) Upgrading ssl_client (1.35.0-r29 ->
> 1.36.1-r5)Executing busybox-1.36.1-r5.triggerOK: 5 MiB in 15 packages/
> # apk upgrade musl
> --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/main
> --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/community(1/1)
> Upgrading musl (1.2.3-r5 -> 1.2.4-r2)OK: 5 MiB in 15 packages/ # apk
> upgrade rust --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/main
> --repository=https://dl-cdn.alpinelinux.org/alpine/v3.18/communitySegmentation
> fault/ # apk -hSegmentation fault/ # ls /tmp/core*Segmentation fault/
> # cd /tmp/tmp # lsSegmentation fault

i'd

# cp /lib/ld-musl-armhf.so.1 /tmp
# apk add gdb musl-dbg apk-tools-static

then upgrade musl using apk.static, then debug via

# /tmp/ld-musl-armhf.so.1 /usr/bin/gdb --args ls -l /tmp

or analyze a core dump, you can always install more debug tools
via apk.static and run commands using the old ld-musl-armhf.so.1

in gdb, you want to do

bt
disas $pc-40,+80
info reg
info proc map

as a starting point and post the results.

strace output can be useful too as well as readelf -aW of ld.so
depending on what is going on.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.