Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hdparm buffer overflows [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Thu Apr 12, 2018 1:59 pm    Post subject: hdparm buffer overflows [SOLVED] Reply with quote

EDIT: SOLVED! Follow here.

Whenever I tried to run hdparm on my amd64 server, it segfaulted.
I suspected it might not be compatible with my current glibc.
shellcmd: eshowkw hdparm :
Keywords for sys-apps/hdparm:
        |                             |   u   | 
        | a a         p   a         s |   n   | 
        | l m   h i   p   r m m s   p | e u s | r
        | p d a p a p c x m 6 i 3   a | a s l | e
        | h 6 r p 6 p 6 8 6 8 p 9 s r | p e o | p
        | a 4 m a 4 c 4 6 4 k s 0 h c | i d t | o
--------+-----------------------------+-------+-------
[I]9.51 | + + + + + + + + + ~ ~ ~ ~ + | 5 o 0 | gentoo
   9.52 | + + + + + + + + ~ ~ ~ ~ ~ + | 5 o   | gentoo
   9.55 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | 6 #   | gentoo
   9.56 | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | 6 o   | gentoo

I had 9.52 installed, but then downgraded it to 9.51 which fixed the problem.

I don't know how long it had been segfaulting on my server, but I have services and udev rules which rely on hdparm which were then non-working because of this.

I didn't find a bug for this... Can someone else reproduce this?
I can later upgrade hdparm back and grab the error messages if needed.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!


Last edited by Zucca on Fri Apr 19, 2019 2:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30907
Location: here

PostPosted: Thu Apr 12, 2018 2:03 pm    Post subject: Reply with quote

What exactly command you run? With which version of glibc?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Thu Apr 12, 2018 2:07 pm    Post subject: Reply with quote

glibc is 2.25-r11.
And I tried several commands all failed except -h (help).
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30907
Location: here

PostPosted: Thu Apr 12, 2018 2:22 pm    Post subject: Reply with quote

Zucca wrote:
glibc is 2.25-r11.
And I tried several commands all failed except -h (help).

No isn't a glibc problem
Code:
$ qlist -Iv glibc hdparm
sys-apps/hdparm-9.52
sys-libs/glibc-2.25-r11
# hdparm /dev/sda

/dev/sda:
 multcount     =  1 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 121601/255/63, sectors = 1953525168, start = 0

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Apr 12, 2018 2:38 pm    Post subject: Reply with quote

fedeliallalinea wrote:
No isn't a glibc problem

fedeliallalinea, Zucca, et al ... I doesn't look to be hdparm either, as 9.51 > 9.52 changes only include "add[ing] support for Jmicron USB-SATA bridges".

best ... khay
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30907
Location: here

PostPosted: Thu Apr 12, 2018 2:53 pm    Post subject: Reply with quote

khayyam wrote:
fedeliallalinea, Zucca, et al ... I doesn't look to be hdparm either, as 9.51 > 9.52 changes only include "add[ing] support for Jmicron USB-SATA bridges".

Good point (I have not looked at the application changelog) :P

@Zucca: You should try to debugging with gdb
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Thu Apr 12, 2018 3:09 pm    Post subject: Reply with quote

Well... This is strange. I don't even use ccache.
I'll rebuild the newer version again and try to recreate the failure.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Fri Apr 13, 2018 12:52 am    Post subject: Reply with quote

How did you downgrade? Did you rebuild the older version or install a saved binary package of the older version?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Fri Apr 13, 2018 7:28 am    Post subject: Reply with quote

Hu wrote:
How did you downgrade? Did you rebuild the older version or install a saved binary package of the older version?
Rebuild.

And I remembered incorrectly. It caused a buffer overflow.
This happens with just compiled hdparm-9.52:
Code:
# hdparm -Tt /dev/sda

/dev/sda:
*** buffer overflow detected ***: hdparm terminated
======= Backtrace: =========
/lib64/libc.so.6(+0x777eb)[0x7fa53f37b7eb]
/lib64/libc.so.6(__fortify_fail+0x47)[0x7fa53f4103a7]
/lib64/libc.so.6(+0x109b50)[0x7fa53f40db50]
/lib64/libc.so.6(__strcat_chk+0x64)[0x7fa53f40cb84]
hdparm(+0x11000)[0x557674b3b000]
hdparm(+0x117aa)[0x557674b3b7aa]
hdparm(+0x14076)[0x557674b3e076]
hdparm(+0x6ac3)[0x557674b30ac3]
hdparm(+0x3da1)[0x557674b2dda1]
/lib64/libc.so.6(__libc_start_main+0xf1)[0x7fa53f324521]
hdparm(+0x578a)[0x557674b2f78a]
======= Memory map: ========
557674b2a000-557674b48000 r-xp 00000000 09:01 809828                     /sbin/hdparm
557674d48000-557674d49000 r--p 0001e000 09:01 809828                     /sbin/hdparm
557674d49000-557674d4a000 rw-p 0001f000 09:01 809828                     /sbin/hdparm
557674d4a000-557674d6e000 rw-p 00000000 00:00 0                          [heap]
7fa53f0ec000-7fa53f101000 r-xp 00000000 09:01 3416339                    /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libgcc_s.so.1
7fa53f101000-7fa53f300000 ---p 00015000 09:01 3416339                    /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libgcc_s.so.1
7fa53f300000-7fa53f301000 r--p 00014000 09:01 3416339                    /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libgcc_s.so.1
7fa53f301000-7fa53f302000 rw-p 00015000 09:01 3416339                    /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libgcc_s.so.1
7fa53f304000-7fa53f4ac000 r-xp 00000000 09:01 418092                     /lib64/libc-2.25.so
7fa53f4ac000-7fa53f6ac000 ---p 001a8000 09:01 418092                     /lib64/libc-2.25.so
7fa53f6ac000-7fa53f6b0000 r--p 001a8000 09:01 418092                     /lib64/libc-2.25.so
7fa53f6b0000-7fa53f6b2000 rw-p 001ac000 09:01 418092                     /lib64/libc-2.25.so
7fa53f6b2000-7fa53f6b6000 rw-p 00000000 00:00 0
7fa53f6bc000-7fa53f6df000 r-xp 00000000 09:01 418062                     /lib64/ld-2.25.so
7fa53f8da000-7fa53f8df000 rw-p 00000000 00:00 0
7fa53f8df000-7fa53f8e0000 r--p 00023000 09:01 418062                     /lib64/ld-2.25.so
7fa53f8e0000-7fa53f8e1000 rw-p 00024000 09:01 418062                     /lib64/ld-2.25.so
7fa53f8e1000-7fa53f8e3000 rw-p 00000000 00:00 0
7ffde8b58000-7ffde8b79000 rw-p 00000000 00:00 0                          [stack]
7ffde8bbc000-7ffde8bbe000 r--p 00000000 00:00 0                          [vvar]
7ffde8bbe000-7ffde8bc0000 r-xp 00000000 00:00 0                          [vdso]
Aborted

_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Apr 13, 2018 5:32 pm    Post subject: Reply with quote

Zucca wrote:
Code:
/lib64/libc.so.6(__strcat_chk+0x64)[0x7fa53f40cb84]

Zucca ... that is a strcpy (string copy) to a buffer, and the buffer is probably too small (so str can't fit within allocated memory). I doesn't happen here (x86), or it seems on fedeliallalinea's install, so it's probably something specific to your env, can you post 'emerge --info' and 'strace hdparm -Tt /dev/sda'.

FYI ... here are the various strcpy in hdparm src

Code:
[root@aporia: src/distfiles/hdparm-9.52]# grep strcpy *.c
fibmap.c:      strcpy(lba_info, "      -          -   ");
fibmap.c:      strcpy(len_info, "      -   ");
hdparm.c:      strcpy(security_password, passwd);
hdparm.c:      strcpy(security_password, argp);
sysfs.c:   strcpy(pathtail+1, new);
sysfs.c:   strcpy(path, "/sys/block");
sysfs.c:   strcpy(path, start_path);
sysfs.c:      strcpy(file_path, path);

best ... khay
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Fri Apr 13, 2018 8:23 pm    Post subject: Reply with quote

The strace is big. I couldn't post it to pastebin.
For your convenience.:
curl -s http://www.kahvipannu.com/~zucca/hdparm-strace.txt.bz2 | bzcat | less
Hehe. I see now why it overflows... Nice loop. :P But what causes it?
emerge --info:
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/no-multilib, gcc-6.4.0, glibc-2.25-r11, 4.9.16-gentoo-zelan x86_64)
=================================================================
System uname: Linux-4.9.16-gentoo-zelan-x86_64-AMD_Opteron-tm-_Processor_3380-with-gentoo-2.4.1
KiB Mem:    16376644 total,    906780 free
KiB Swap:   12582904 total,  12572188 free
Timestamp of repository gentoo: Fri, 06 Apr 2018 18:30:01 +0000
Head commit of repository gentoo: 25b763f60111aa450fb06fc50a6af068414557a2
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r11::gentoo
Repositories:

causelay
    location: /var/lib/layman/causelay
    sync-type: laymansync
    sync-uri: https://github.com/causes-/causelay.git
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sunrise-reviewed.git
    masters: gentoo
    priority: 50

zucca
    location: /var/lib/layman/zucca
    sync-type: laymansync
    sync-uri: https://github.com/Zuccace/zucca-overlay.git
    masters: gentoo
    priority: 50

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 60
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-frecord-gcc-switches -O2 -pipe -march=bdver2 -mvzeroupper"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-frecord-gcc-switches -O2 -pipe -march=bdver2 -mvzeroupper"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 6 --load-average 8.2 --complete-graph y --with-bdeps=y --backtrack=100"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://gentoo.gossamerhost.com/gentoo-distfiles/ rsync://trumpetti.atm.tut.fi/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="12bit 256-color 7z aac aacplus aacs aalib acl aesicm alsa alsa-plugin amd64 amr amrenc antminer berkdb bindist bluray btrfs bzip2 cli cpumining crypt cxx dedicated dri dvb dvd efi ffmpeg flac fortran ftp gdbm gif gridseed grub hpn icarus iconv infiniband ipv6 jpeg jpeg2000 jpeg2k jpg jpg2000 jpg2k lame libass libcaca libmpd libmpdclient libmpv libv4l libvpx logger logrotate lua mad mdadm modules mp3 mp4 mpd mpeg mpeg2 mpeg3 mpg123 ncurses nfs nftables nls nptl offensive ogg openh264 openmp openrc opus pam pcre png readline schroedinger script scrypt seccomp sensord server sftp sha256d sqlite ssh ssl sync-plugin-portage system-binutils system-boost system-cairo system-crontab system-ffmpeg system-harfbuzz system-icu system-jpeg system-jsoncpp system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-mitkrb5 system-mupdf system-qemu system-qt system-renpy system-seabios system-snappy system-sqlite system-tbb system-uulib system-wine system-zlib tcl tcpd theora threaded threads unicode v4l vim vim-syntax vorbis vpx x264 x265 xattr xvid zeusminer zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 emu pc qemu" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi fbdev vesa v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


My system is bit outdated since I'm in big process of repartitioning all my hard drives while also switching to UEFI boot.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Apr 13, 2018 10:16 pm    Post subject: Reply with quote

Zucca wrote:
Hehe. I see now why it overflows... Nice loop. :P But what causes it?

Zucca ... honestly, I've no idea, it should mlock and move on, but for some reason it just goes energy bunny ending with the buffer overflow. As a comparison there are only 9 'stats' (all ending 'ENOENT') if I 'strace -o output -Tt /dev/sda'.

I notice that you have an older binutils set, can you run 'eselect binutils' and set it to 2.29.1-r1, also to rule out the compiler/cflags could you build with vanilla CFLAGS, ie just "-O2 -pipe".

BTW, in the previous post I said 'strcpy', when its 'srycat', sorry, lack of sleep.

best ... khay
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Sat Apr 14, 2018 12:36 am    Post subject: Reply with quote

Neither binutils nor gcc version should matter here. The code is simply wrong. It uses unchecked string copying/concatenation with inputs that cannot be proved correct by simple source inspection. That is always a bug, because you can never be sure that an external data source will produce only "safe" inputs.

Constructing a path by repeatedly appending .. to it is weird. In ordinary cases, the right thing to do would be to explicitly strip the innermost directory, rather than leaving that directory present and trying to negate it with a ... I think the goal here is to force the kernel to follow the symlink. It would be safer, though slightly more work, to follow the links explicitly by using readlink.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sat Apr 14, 2018 10:46 am    Post subject: Reply with quote

Progress
Code:
CFLAGS="-frecord-gcc-switches -O0 -pipe -march=bdver2 -mvzeroupper" emerge -v hdparm
And I don't get buffer overflows anymore.
So it's some switch included in -O1 which triggers it. I tested with -O2 and -O1, both result in overflow.
Although it could be some combinations too. By removing -mvzeroupper or -frecord-gcc-switches didn't affect.

EDIT: Overflowing occurs with -Os and -Ofast (as expected) too.
Code:
CC="/usr/lib/llvm/5/bin/clang" CFLAGS="-O2 -pipe -march=bdver2" emerge -v hdparm
... instead works. I removed -mvzeroupper since IIRC clang doesn't recognize it. And for obvious reasons -frecord-gcc-switches was removed too.

I'm staring at GCC here...
I'll proceed with compiling with newer gcc versions...
EDIT02: I'll take that back. It seems I have already the latest stable gcc. I'll get back to this after other ugrades in progress are finished...
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Sat Apr 14, 2018 5:00 pm    Post subject: Reply with quote

Why are you blaming gcc when I just told you it isn't the problem? :) The abort is because source fortification caught the program doing something stupid. Source fortification requires some optimization passes to work correctly. Hence, -O0 disables source fortification, so the program is permitted to do stupid things right up until those stupid things trigger a crash due to memory corruption. Source fortification forces a crash early, before the corruption can break anything. This is almost always better, because trying to reconstruct the root cause after memory corruption is more painful than identifying a root cause when source fortification aborted on the first undefined operation. The only time it is worse is if the undefined behavior happened not to corrupt anything important.

You need to focus on making it not do stupid things (specifically, using unchecked writes into a buffer too small for the inputs available). If you need help with that, please ask. Someone can likely write a patch for you to trap the bad behavior. Writing a patch to make the program work correctly is a little more time consuming, but preventing the crash shouldn't be hard.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Sat Apr 14, 2018 6:18 pm    Post subject: Reply with quote

So clang doesn't fortify source then? Right?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Sat Apr 14, 2018 8:03 pm    Post subject: Reply with quote

Source fortification depends on optimization level, library headers, and some compiler intrinsics. It might work in clang if the right intrinsics are implemented and work as they do in gcc. Based on your earlier results, clang apparently doesn't implement the right checks to catch this particular corruption. You might try building with -fsanitize=address instead, for both compilers.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3343
Location: Rasi, Finland

PostPosted: Fri Apr 19, 2019 2:46 pm    Post subject: Reply with quote

*BUMP*

[SOLVED]

https://sourceforge.net/p/hdparm/bugs/78/ hdparm maintainers have fixed the bug.
Unfortunately it still exists in 9.56. Fortunately users with stable packages can manually accept ~keywords.
I did exactly it and hdparm is now working again... finally.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum