Activity log for bug #2044852

Date Who What changed Old value New value Message
2023-11-27 20:59:39 Tobias Heider bug added bug
2023-11-28 01:22:08 Tobias Heider attachment added hashtest.c https://bugs.launchpad.net/ubuntu/+source/libgcrypt20/+bug/2044852/+attachment/5723975/+files/hashtest.c
2023-11-28 01:23:19 Tobias Heider attachment added libgcrypt.debdiff https://bugs.launchpad.net/ubuntu/+source/libgcrypt20/+bug/2044852/+attachment/5723976/+files/libgcrypt.debdiff
2023-11-28 01:27:49 Dimitri John Ledkov description [ Impact ] SHA3 produces wrong results for inputs bigger than 4 GiB [ Test Plan ] Calculate sha3 hash of a big input file and compare with output of another implementation like OpenSSL. Expected behavior: same output Actual behavior: different output [ Where problems could occur ] People relying on the broken hash might be surprised by the new fixed result. The impact is hopefully low since SHA3 from libgcrypt is not too widely used, especially not with this input size. [ Other Info ] From upstream bug report: The SHA3 functions give wrong results for inputs larger than 4GB, because the originally size_t argument handled as unsigned int in keccak_write and leads to integer overflows. This does not happen if the data is fed into the md_write by smaller chunks. More information and reproducers are available from Clemens in the attached bug. The fix that should solve the problem (use of the size_t) is available now at gitlab: https://gitlab.com/redhat-crypto/libgcrypt/libgcrypt-mirror/-/merge_requests/6 Comments welcomed. I was considering updating the some of the hash tests to capture this issue, but did not find a simple way to do that yet so I will keep it on you to decide if you believe some regression test is needed here. Upstream Bug: https://dev.gnupg.org/T6217 Upstream Fix: https://dev.gnupg.org/rC9c828129b2058c3f36e07634637929a54e8377ee [ Impact ] SHA3 produces wrong results for inputs bigger than 4 GiB [ Test Plan ] Calculate sha3 hash of a big input file and compare with output of another implementation like OpenSSL. Expected behavior: same output Actual behavior: different output [ Where problems could occur ] People relying on the broken hash might be surprised by the new fixed result. The impact is hopefully low since SHA3 from libgcrypt is not too widely used, especially not with this input size. [ Other Info ] From upstream bug report: The SHA3 functions give wrong results for inputs larger than 4GB, because the originally size_t argument handled as unsigned int in keccak_write and leads to integer overflows. This does not happen if the data is fed into the md_write by smaller chunks. More information and reproducers are available from Clemens in the attached bug. The fix that should solve the problem (use of the size_t) is available now at gitlab: https://gitlab.com/redhat-crypto/libgcrypt/libgcrypt-mirror/-/merge_requests/6 Comments welcomed. I was considering updating the some of the hash tests to capture this issue, but did not find a simple way to do that yet so I will keep it on you to decide if you believe some regression test is needed here. Upstream Bug: https://dev.gnupg.org/T6217 Upstream Fix: https://dev.gnupg.org/rC9c828129b2058c3f36e07634637929a54e8377ee [ WARNING ] !!! Warning !!! hashtest.c reproducer allocates 5GB of RAM, do not run on 32-bit architectures. Do not run if you don't have that much RAM free, as it will likely trigger OOM and may kill your machine. !!! Warning !!!
2023-11-28 04:18:16 Ubuntu Foundations Team Bug Bot tags patch
2023-11-28 04:18:19 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Sponsors
2023-11-28 10:56:47 Tobias Heider description [ Impact ] SHA3 produces wrong results for inputs bigger than 4 GiB [ Test Plan ] Calculate sha3 hash of a big input file and compare with output of another implementation like OpenSSL. Expected behavior: same output Actual behavior: different output [ Where problems could occur ] People relying on the broken hash might be surprised by the new fixed result. The impact is hopefully low since SHA3 from libgcrypt is not too widely used, especially not with this input size. [ Other Info ] From upstream bug report: The SHA3 functions give wrong results for inputs larger than 4GB, because the originally size_t argument handled as unsigned int in keccak_write and leads to integer overflows. This does not happen if the data is fed into the md_write by smaller chunks. More information and reproducers are available from Clemens in the attached bug. The fix that should solve the problem (use of the size_t) is available now at gitlab: https://gitlab.com/redhat-crypto/libgcrypt/libgcrypt-mirror/-/merge_requests/6 Comments welcomed. I was considering updating the some of the hash tests to capture this issue, but did not find a simple way to do that yet so I will keep it on you to decide if you believe some regression test is needed here. Upstream Bug: https://dev.gnupg.org/T6217 Upstream Fix: https://dev.gnupg.org/rC9c828129b2058c3f36e07634637929a54e8377ee [ WARNING ] !!! Warning !!! hashtest.c reproducer allocates 5GB of RAM, do not run on 32-bit architectures. Do not run if you don't have that much RAM free, as it will likely trigger OOM and may kill your machine. !!! Warning !!! [ Impact ] SHA3 produces wrong results for inputs bigger than 4 GiB [ Test Plan ] Calculate sha3 hash of a big input file and compare with output of another implementation like OpenSSL. Expected behavior: same output Actual behavior: different output Run reproducer attached below (if your machine can afford to allocate 5G RAM at once) and see that the patch fixes the assertion error. [ Where problems could occur ] People relying on the broken hash might be surprised by the new fixed result. The impact is hopefully low since SHA3 from libgcrypt is not too widely used, especially not with this input size. [ Other Info ] From upstream bug report: The SHA3 functions give wrong results for inputs larger than 4GB, because the originally size_t argument handled as unsigned int in keccak_write and leads to integer overflows. This does not happen if the data is fed into the md_write by smaller chunks. More information and reproducers are available from Clemens in the attached bug. The fix that should solve the problem (use of the size_t) is available now at gitlab: https://gitlab.com/redhat-crypto/libgcrypt/libgcrypt-mirror/-/merge_requests/6 Comments welcomed. I was considering updating the some of the hash tests to capture this issue, but did not find a simple way to do that yet so I will keep it on you to decide if you believe some regression test is needed here. Upstream Bug: https://dev.gnupg.org/T6217 Upstream Fix: https://dev.gnupg.org/rC9c828129b2058c3f36e07634637929a54e8377ee [ WARNING ] !!! Warning !!! hashtest.c reproducer allocates 5GB of RAM, do not run on 32-bit architectures. Do not run if you don't have that much RAM free, as it will likely trigger OOM and may kill your machine. !!! Warning !!!
2023-11-28 23:57:32 Tobias Heider attachment added libgcrypt.debdiff https://bugs.launchpad.net/ubuntu/+source/libgcrypt20/+bug/2044852/+attachment/5724428/+files/libgcrypt.debdiff
2023-11-29 17:18:16 Simon Chopin nominated for series Ubuntu Jammy
2023-11-29 17:18:16 Simon Chopin bug task added libgcrypt20 (Ubuntu Jammy)
2023-11-29 17:18:16 Simon Chopin nominated for series Ubuntu Mantic
2023-11-29 17:18:16 Simon Chopin bug task added libgcrypt20 (Ubuntu Mantic)
2023-11-29 17:18:16 Simon Chopin nominated for series Ubuntu Lunar
2023-11-29 17:18:16 Simon Chopin bug task added libgcrypt20 (Ubuntu Lunar)
2023-11-29 17:18:16 Simon Chopin nominated for series Ubuntu Noble
2023-11-29 17:18:16 Simon Chopin bug task added libgcrypt20 (Ubuntu Noble)
2023-11-29 17:36:36 Simon Chopin libgcrypt20 (Ubuntu Mantic): status New Fix Released
2023-11-29 17:36:38 Simon Chopin libgcrypt20 (Ubuntu Noble): status New Fix Released
2023-11-29 17:37:51 Simon Chopin removed subscriber Ubuntu Sponsors
2023-11-30 00:35:13 Tobias Heider bug added subscriber Ubuntu Sponsors
2023-11-30 00:35:28 Tobias Heider libgcrypt20 (Ubuntu Lunar): status New Fix Released
2023-12-01 11:56:43 Dimitri John Ledkov libgcrypt20 (Ubuntu Jammy): status New In Progress
2023-12-01 11:56:47 Dimitri John Ledkov removed subscriber Ubuntu Sponsors
2023-12-01 15:44:10 Ubuntu Archive Robot bug added subscriber Dimitri John Ledkov
2023-12-04 08:54:25 Dimitri John Ledkov bug added subscriber Ubuntu Stable Release Updates Team
2023-12-08 13:14:51 Timo Aaltonen libgcrypt20 (Ubuntu Jammy): status In Progress Fix Committed
2023-12-08 13:14:53 Timo Aaltonen bug added subscriber SRU Verification
2023-12-08 13:14:55 Timo Aaltonen tags patch patch verification-needed verification-needed-jammy