Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601512 - dev-libs/nettle ABI mismatch between 3.2 and 3.3 in symbol nettle_hashes
Summary: dev-libs/nettle ABI mismatch between 3.2 and 3.3 in symbol nettle_hashes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-03 12:01 UTC by emil karlson
Modified: 2017-04-08 18:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emil karlson 2016-12-03 12:01:22 UTC
nettle_hashes is a table that is exported through dynamic linkage. When doing readelf -a against dnsmasq linked against libnettle-3.2 I noticed missmatch in the array size

readelf -a /usr/sbin/dnsmasq /usr/lib64/libnettle.so.6.3 | grep nettle_hashes
000000662d00  00c600000005 R_X86_64_COPY     0000000000662d00 nettle_hashes + 0
   198: 0000000000662d00    80 OBJECT  GLOBAL DEFAULT   24 nettle_hashes@NETTLE_6 (3)
   395: 0000000000662d00    80 OBJECT  GLOBAL DEFAULT   24 nettle_hashes@@NETTLE_6
   205: 0000000000238800   112 OBJECT  GLOBAL DEFAULT   19 nettle_hashes@@NETTLE_6

nettle_hashes is copied by relocation 000000662d00  00c600000005 R_X86_64_COPY     0000000000662d00 nettle_hashes + 0 to dnsmasq bss section and the copy is being truncated, as the allocated size is only 80 for symbol of size 112, this leads to crash when resolving certain names using dnssec

In my assessment (and several other opinions) the nettle-3.2 is not ABI compatible with nettle-3.3 and will cause buggy behaviour.

Reproducible: Always
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2016-12-03 18:50:42 UTC
Hi,
Thank you for the report, I see you report this to multiple downstreams instead of reporting this to upstream[1] where it can be actually solved, as the so version should either be changed or the incompatibility fixed.
Can you please take this to upstream?
Alon

[1] https://www.lysator.liu.se/~nisse/nettle/
Comment 2 emil karlson 2016-12-03 18:58:54 UTC
(In reply to Alon Bar-Lev from comment #1)
> Hi,
> Thank you for the report, I see you report this to multiple downstreams
> instead of reporting this to upstream[1] where it can be actually solved, as
> the so version should either be changed or the incompatibility fixed.
> Can you please take this to upstream?
> Alon
> 
> [1] https://www.lysator.liu.se/~nisse/nettle/

Upstream has also been notified, not sure they will touch existing releases though, would you consider subslotting with gentoo suffix, like -r1 unreasonable?
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2016-12-03 19:02:39 UTC
(In reply to emil karlson from comment #2)
> (In reply to Alon Bar-Lev from comment #1)
> > Hi,
> > Thank you for the report, I see you report this to multiple downstreams
> > instead of reporting this to upstream[1] where it can be actually solved, as
> > the so version should either be changed or the incompatibility fixed.
> > Can you please take this to upstream?
> > Alon
> > 
> > [1] https://www.lysator.liu.se/~nisse/nettle/
> 
> Upstream has also been notified, not sure they will touch existing releases
> though, would you consider subslotting with gentoo suffix, like -r1
> unreasonable?

As this is switch from stable for non stable, I rather wait to know what upstream solution is, either fix or change so version, then we follow.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2016-12-03 19:08:57 UTC
In case anyone wonders it's the mechanics of how exactly ABI floats for
arrays WRT their stat sizes:

http://trofi.github.io/posts/195-dynamic-linking-ABI-is-hard.html
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2017-03-03 12:44:11 UTC
I pinged upstream twice and got no answer, bumped subslot to 6.1 for now.
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2017-04-08 18:31:12 UTC
No reply from upstream, subslot should provide the workaround.