Invalid base64 for high-bit characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The Base64Encode function incorrectly encodes using char instead of uint8_t, leading to characters with the high bit set to be encoded wrongly. This function is used for base authentication, and high bits are set for UTF-8 character sequences, so it's likely affecting people with utf-8 user names and passwords and might cause them to be denied access to their https resources (though arguably they'd work around that).
[Test case]
A unit test has been added that checks that the encoding is correct.
[Where problems could occur]
This only affects the base64 encoding function, which is only used for quoting user names and passwords in basic auth in http, but it's also exposed to library users and like in python-apt, so problems could occur wherever they use that base64 encoding function as well.
Changed in apt (Ubuntu Groovy): | |
status: | Triaged → In Progress |
It's not really fixed in hirsute yet, but the bug is not closed in the 2.1.1.9 changelog, so marking it as such otherwise we'll just forget about it.