overflow bug in wcsncmp_avx2

Bug #2001975 reported by Simon Chopin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLibC
Fix Released
Medium
glibc (Ubuntu)
Fix Released
Medium
Simon Chopin
Focal
Fix Released
Medium
Simon Chopin

Bug Description

[Impact]

See https://sourceware.org/bugzilla/show_bug.cgi?id=28755

Note that we're only impacted by the avx2 issue, the evex-optimized version isn't present in the 2.31 branch.

[Test case]

> test_wcsncmp.c cat <<EOF
#include <wchar.h>
#include <assert.h>

int
main(int argc, char ** argv) {
    assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
}
EOF
gcc -static -o test_wcsncmp test_wcsncmp.c
./test_scsncmp

[Regression potential]

The patch is contained within the AVX-2 optimized routine, but it could still cause introduce a new bug there. In addition, we could see performance regressions.

Revision history for this message
In , Goldstein-w-n (goldstein-w-n) wrote :

Similiar to [BZ 27974](https://sourceware.org/bugzilla/show_bug.cgi?id=27974). The multiply of length by sizeof (wchar_t) can overflow if length is >= 2^62 which can lead to incorrect results.

For example:

#include <wchar.h>
int
main(int argc, char ** argv) {
    assert(__wcsncmp_evex(L"abc", L"abd", (1UL << 62)) != 0);
    assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
}

Will fail on either assert.

Revision history for this message
In , Goldstein-w-n (goldstein-w-n) wrote :

Fix proposed in the following patches:

avx2: https://patchwork.sourceware<email address hidden>/
evex: https://patchwork.sourceware<email address hidden>/

Revision history for this message
In , Goldstein-w-n (goldstein-w-n) wrote :

Fixed in

commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
Author: Noah Goldstein <email address hidden>
Date: Sun Jan 9 16:02:21 2022 -0600

    x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

and

commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
Author: Noah Goldstein <email address hidden>
Date: Sun Jan 9 16:02:28 2022 -0600

    x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.34/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=72123e1b56f53f9205bb105f8a62d0869b837b22

commit 72123e1b56f53f9205bb105f8a62d0869b837b22
Author: H.J. Lu <email address hidden>
Date: Wed Jan 26 20:20:43 2022 -0800

    NEWS: Add a bug entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.33/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=86c153d0922a6da3263f0ade42573bd405d8edee

commit 86c153d0922a6da3263f0ade42573bd405d8edee
Author: H.J. Lu <email address hidden>
Date: Wed Jan 26 20:28:51 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.32/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=40eebb02ccbc2d621e796795d5994fe7483b679f

commit 40eebb02ccbc2d621e796795d5994fe7483b679f
Author: H.J. Lu <email address hidden>
Date: Wed Jan 26 21:00:25 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.31/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5b136510856f3742b58eb5e2de0cada7e9e95630

commit 5b136510856f3742b58eb5e2de0cada7e9e95630
Author: H.J. Lu <email address hidden>
Date: Thu Jan 27 05:16:30 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.30/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9d868841f870c22c05e5ce11900afc9abd8fda02

commit 9d868841f870c22c05e5ce11900afc9abd8fda02
Author: H.J. Lu <email address hidden>
Date: Thu Jan 27 05:31:02 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.29/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2f3fb944b311b67e609ed79478cc1737f6066af9

commit 2f3fb944b311b67e609ed79478cc1737f6066af9
Author: H.J. Lu <email address hidden>
Date: Thu Jan 27 05:34:02 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.28/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=43c27a754bd417726032006d0a564d946994554e

commit 43c27a754bd417726032006d0a564d946994554e
Author: H.J. Lu <email address hidden>
Date: Thu Jan 27 07:30:10 2022 -0800

    NEWS: Add a bug fix entry for BZ #28755

Revision history for this message
In , Hjl-tools (hjl-tools) wrote :

Fixed for 2.35 and all release branches.

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aa5a720056d37cf24924c138a3dbe6dace98e97c

commit aa5a720056d37cf24924c138a3dbe6dace98e97c
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.35/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a30807b7db924d31681e9c6e98e78f2f46a2640c

commit a30807b7db924d31681e9c6e98e78f2f46a2640c
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.34/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=04d60ce0f21ffe2a4add148cb37a1942dbad64e2

commit 04d60ce0f21ffe2a4add148cb37a1942dbad64e2
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.33/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb922428dc7c5260ea84de482ffe05d2ea766199

commit cb922428dc7c5260ea84de482ffe05d2ea766199
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.32/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f8a2390000c4e9a152b5f6cf8220f2560c01e74

commit 0f8a2390000c4e9a152b5f6cf8220f2560c01e74
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.31/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=775c05b28c1883c5860f582cca68abf9036d9ace

commit 775c05b28c1883c5860f582cca68abf9036d9ace
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.30/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9

commit 70522b1c1d1ffa5e3bd55aa3c064ea93a330bde9
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.29/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a486152569be7ccdd748f669631285e1a16f2e73

commit a486152569be7ccdd748f669631285e1a16f2e73
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Revision history for this message
In , Cvs-commit (cvs-commit) wrote :

The release/2.28/master branch has been updated by H.J. Lu <email address hidden>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9e050d1370587e808bc7bc3d151c5beb417120cb

commit 9e050d1370587e808bc7bc3d151c5beb417120cb
Author: H.J. Lu <email address hidden>
Date: Thu Feb 17 08:10:35 2022 -0800

    string: Add a testcase for wcsncmp with SIZE_MAX [BZ #28755]

    Verify that wcsncmp (L("abc"), L("abd"), SIZE_MAX) == 0. The new test
    fails without

    commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:21 2022 -0600

        x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]

    and

    commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b
    Author: Noah Goldstein <email address hidden>
    Date: Sun Jan 9 16:02:28 2022 -0600

        x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]

    This is for BZ #28755.

    Reviewed-by: Sunil K Pandey <email address hidden>

    (cherry picked from commit aa5a720056d37cf24924c138a3dbe6dace98e97c)

Simon Chopin (schopin)
Changed in glibc (Ubuntu):
status: New → Fix Released
Changed in glibc (Ubuntu Focal):
status: New → In Progress
assignee: nobody → Simon Chopin (schopin)
importance: Undecided → Medium
Changed in glibc:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Simon, or anyone else affected,

Accepted glibc into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.31-0ubuntu9.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in glibc (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.10)

All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.10) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

4ti2/1.6.9+ds-2build1 (armhf)
android-platform-external-libunwind/8.1.0+r23-2 (armhf)
android-platform-frameworks-native/1:8.1.0+r23-2build1 (armhf)
apparmor/unknown (armhf)
apport/2.20.11-0ubuntu27.27 (armhf)
at-spi2-core/2.36.0-2 (armhf)
atk1.0/2.35.1-1ubuntu2 (armhf)
augustus/unknown (armhf)
autodock-vina/unknown (armhf)
autopilot-gtk/1.6.0 (armhf)
bgw-replstatus/1.0.4 (armhf)
biosquid/1.9g+cvs20050121-11 (armhf)
blackbox/0.70.1-38 (armhf)
bomstrip/9-13 (armhf)
borgbackup/1.1.15-1~ubuntu1.20.04.1 (armhf)
bosh/0.6-10 (armhf)
botch/0.22-3 (armhf)
brlaser/6-1build1 (armhf)
burp/2.2.18-2 (armhf)
butt/unknown (armhf)
cargo/0.66.0+ds0ubuntu0.libgit2-0ubuntu0.20.04 (armhf)
ceph/15.2.17-0ubuntu0.20.04.4 (armhf)
chafa/1.2.1-1 (armhf)
clearcut/1.0.9-5 (armhf)
consulfs/0.2.1-1 (armhf)
coturn/4.5.1.1-1.1ubuntu0.20.04.2 (armhf)
dune-common/2.6.0-4build1 (armhf)
fpc/3.0.4+dfsg-23 (arm64)
frameworkintegration/5.68.0-0ubuntu1 (armhf)
heaptrack/1.1.0+20180922.gitf752536-4build1 (armhf)
jsonnet/unknown (armhf)
kbibtex/0.8.1-1ubuntu5 (armhf)
kholidays/1:5.68.0-0ubuntu1 (armhf)
kiconthemes/5.68.0-0ubuntu1 (armhf)
kitemmodels/5.68.0-0ubuntu1 (armhf)
kpty/5.68.0-0ubuntu1 (armhf)
libdbd-pg-perl/3.10.4-1 (amd64)
libgdata/0.17.12-1 (armhf)
libtk-tablematrix-perl/1.23-7 (armhf)
linux-gcp-5.15/5.15.0-1036.44~20.04.1 (arm64)
linux-gke-5.15/5.15.0-1036.41~20.04.1 (arm64)
linux-lowlatency-hwe-5.15/5.15.0-75.82~20.04.1 (arm64)
linux-oracle-5.15/5.15.0-1037.43~20.04.1 (arm64)
magicrescue/1.1.10-3 (armhf)
mercurial/5.3.1-1ubuntu1 (amd64, armhf, ppc64el)
modemmanager-qt/5.68.0-0ubuntu1 (armhf)
node-ws/7.2.1-3 (armhf)
octave-image/2.12.0-2 (armhf)
osmo-mgw/1.4.0-1 (armhf)
php-excimer/1.0.0~git20190913.d82eaf7-1build1 (arm64)
polkit-qt-1/0.113.0-0ubuntu2 (armhf)
qcustomplot/2.0.1+dfsg1-1build1 (armhf)
qutip/4.4.1-6build1 (amd64)
r-cran-ps/1.3.2-2 (armhf)
ruby-bootsnap/1.4.6-1 (amd64)
ruby-standalone/2.7~2 (armhf)
ruby2.7/2.7.0-5ubuntu1.11 (armhf, s390x)
sks/1.1.6-14 (s390x)
systemd/245.4-4ubuntu3.22 (armhf)
threadweaver/5.68.0-0ubuntu1 (armhf)
tomb/2.7+dfsg2-1 (amd64)
umockdev/0.14.1-1ubuntu0.1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Simon Chopin (schopin) wrote :

Verified in a fresh LXD container:

root@focal-glibc:~# gcc -static -o test_wcsncmp test_wcsncmp.c
In file included from test_wcsncmp.c:2:
test_wcsncmp.c: In function ‘main’:
test_wcsncmp.c:6:12: warning: implicit declaration of function ‘__wcsncmp_avx2’ [-Wimplicit-function-declaration]
    6 | assert(__wcsncmp_avx2(L"abc", L"abd", (1UL << 62)) != 0);
      | ^~~~~~~~~~~~~~
root@focal-glibc:~# ./test_wcsncmp && echo OK
OK

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote :

All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.10) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

cargo/0.66.0+ds0ubuntu0.libgit2-0ubuntu0.20.04 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.11)

All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.11) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

dune-common/2.6.0-4build1 (armhf)
khtml/5.68.0-0ubuntu1 (armhf)
kitemmodels/5.68.0-0ubuntu1 (armhf)
kpeople/5.68.0-0ubuntu1 (armhf)
kplotting/5.68.0-0ubuntu1 (armhf)
kpty/5.68.0-0ubuntu1 (armhf)
kxmlgui/5.68.0-0ubuntu2 (armhf)
linux-nvidia-tegra-5.15/5.15.0-1015.15~20.04.1 (arm64)
netplan.io/0.104-0ubuntu2~20.04.2 (s390x)
nfs-utils/1:1.3.4-2.5ubuntu3.4 (amd64)
ruby-stackprof/0.2.15-2 (arm64)
sbd/1.4.1-3 (s390x)
threadweaver/5.68.0-0ubuntu1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Simon, or anyone else affected,

Accepted glibc into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.31-0ubuntu9.12 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-focal
removed: verification-done verification-done-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.12)

All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.12) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

aevol/5.0+ds-1build1 (arm64)
c-icap/1:0.5.3-3 (armhf)
cysignals/1.10.2+ds-4 (s390x)
dbus/1.12.16-2ubuntu2.3 (armhf)
docker.io/20.10.21-0ubuntu1~20.04.2 (amd64, arm64, ppc64el, s390x)
flatpak/1.6.5-0ubuntu0.4 (ppc64el)
kholidays/1:5.68.0-0ubuntu1 (armhf)
kplotting/5.68.0-0ubuntu1 (armhf)
libimage-sane-perl/5-1 (arm64)
libreoffice/1:6.4.7-0ubuntu0.20.04.8 (armhf)
libxml-libxslt-perl/1.99-1 (s390x)
libxml-quote-perl/1.02-4build2 (s390x)
linux-aws-5.15/5.15.0-1041.46~20.04.1 (arm64)
linux-gcp-5.15/5.15.0-1039.47~20.04.1 (arm64)
linux-lowlatency-hwe-5.15/5.15.0-79.88~20.04.1 (arm64)
mariadb-10.3/1:10.3.38-0ubuntu0.20.04.1 (armhf)
postgresql-12/12.15-0ubuntu0.20.04.1 (amd64)
r-bioc-delayedarray/0.12.2+dfsg-1 (armhf)
r-cran-curl/4.3+dfsg-1 (armhf)
systemd/245.4-4ubuntu3.22 (arm64)
threadweaver/5.68.0-0ubuntu1 (amd64)
utox/0.17.1-1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Simon Chopin (schopin) wrote :

Verified in a fresh container:

root@focal-glibc:~# ./test_wcsncmp
root@focal-glibc:~# echo $?
0
root@focal-glibc:~# dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-=================================
ii libc6:amd64 2.31-0ubuntu9.12 amd64 GNU C Library: Shared libraries

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for glibc has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.31-0ubuntu9.12

---------------
glibc (2.31-0ubuntu9.12) focal; urgency=medium

  * Drop SVE memcpy implementation due to kernel-related performance
    regression

glibc (2.31-0ubuntu9.11) focal; urgency=medium

  * Drop memcmp arm64 SIMD optimization patch due to performance regression
    on Raspberry Pi 3+ and 4

glibc (2.31-0ubuntu9.10) focal; urgency=medium

  [ Andrei Gherzan ]
  * d/p/lp1910312: Backport upstream fix for SEM_STAT_ANY (LP: #1910312)

  [ Simon Chopin ]
  * d/p/lp1999551/*: backport mem{cmp,cpy} optimizations for arm64 (LP: #1999551)
  * d/p/lp2001932/*: fix segfault in AVX2 strncmp (LP: #2001932)
  * d/p/lp2001975/*: fix overflow in AVX2 wcsncmp (LP: #2001975)

 -- Simon Chopin <email address hidden> Wed, 26 Jul 2023 09:44:39 +0200

Changed in glibc (Ubuntu Focal):
status: Fix Committed → Fix Released
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.