uuidgen possible problem with v3 uuids

Bug #1892516 reported by Dave Ford
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

Generating a version 3 uuid on Ubuntu appears to be producing inconsistent output compared to online checkers and versions of this tool compiled on different OSs. E.g.

On U18.04.5
uuidgen --namespace @dns --name 'foo' -m (version 3 using md5)
3f46ae03-c654-36b0-855d-cd0aa042c9f2

uuidgen --namespace @dns --name 'foo' -s (version 5 with sha1)
b84ed8ed-a7b1-502f-83f6-90132e68adef

On Gentoo,
uuidgen --namespace @dns --name 'foo' -m
3f46ae03-c654-36b0-a55d-cd0aa042c9f2 (note a55d rather than 855d)

uuidgen --namespace @dns --name 'foo' -s
b84ed8ed-a7b1-502f-83f6-90132e68adef

On raspbian
uuidgen --namespace @dns --name 'foo' -m
3f46ae03-c654-36b0-a55d-cd0aa042c9f2 (note a55d same as on gentoo)

uuidgen --namespace @dns --name 'foo' -s
b84ed8ed-a7b1-502f-83f6-90132e68adef

Looking at this https://github.com/karelzak/util-linux/issues/683

gave me pause to see if I could replicate this similar problem
On Ubuntu, using the python library I get
python -c "import uuid ; print(uuid.uuid3(uuid.UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), 'foo'))"
3f46ae03-c654-36b0-a55d-cd0aa042c9f2

The same result is returned on raspbian and Gentoo.

This makes me wonder if there's a problem with the uuidgen tool, as python is giving me consistent results on all three OS's and agrees with the uuidgen tool in Gentoo and Raspbian and also agrees with the output of this webtool

https://uuidonline.com/

and this

https://www.uuidtools.com/v3

Ubuntu is producing a different result.

Dave Ford (d-ford)
description: updated
Revision history for this message
Dave Ford (d-ford) wrote :

We've not yet moved to U20 LTS due to block on the upgrade path - but I note that after downloading and testing the same on U20 20.04 TLS, the behaviour of uuidgen has changed

uuidgen --namespace @dns --name 'foo' -m
3f46ae03-c654-36b0-a55d-cd0aa042c9f2

So clearly this has changed between the V 2.34 on U20 and V 2.31.1 on U18.

This is all rather unfortunately as these are supposed to be deterministic. Should I expect that the behaviour of uuidgen to change on the older LTS versions? Or does the LTS status indicate that this different version wouldn't be backported?

As long I know how/when these uuid's are generated I can work around it (or just use sha1 versions).

Thanks!

Revision history for this message
Sami Kerola (kerolasa) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.