libc6 2.11.1-0ubuntu5 strcmp-ssse3 may return incorrect result

Bug #563291 reported by Yang Yu on 2010-04-14
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
High
Unassigned
Lucid
High
Unassigned

Bug Description

Description: Ubuntu lucid (development branch)
Release: 10.04
libc6: Installed: 2.11.1-0ubuntu5

Using strncmp in my program. Sometimes it returns non-zero for identical portion of two strings. A following memcmp does return zero. The strncmp has strcmp-ssse3 implementation.

The bug only happens with certain addresses where the strings are stored, so most likely it is some alignment issue within strcmp-ssse3. If copying the un-matched strings to other buffers, the comparison usually succeed.

See the attached test program strcmp-ssse3-err.c. It has two strings stored at specific addresses which make strncmp fail.

Related branches

Yang Yu (yang-yyu) wrote :

Note in this test program, the failure starts from the 48th characters.

Matthias Klose (doko) on 2010-04-14
Changed in eglibc (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Matthias Klose (doko) on 2010-04-15
Changed in eglibc (Ubuntu):
milestone: none → ubuntu-10.04
status: Confirmed → In Progress
Matthias Klose (doko) on 2010-04-15
Changed in eglibc (Ubuntu Lucid):
status: In Progress → Fix Committed
Matthias Klose (doko) wrote :

prepared a test package at
deb http://ppa.launchpad.net/ubuntu-toolchain/ppa/ubuntu lucid main

please could you check if the issue is fixed for you?

Yang Yu (yang-yyu) wrote :

Thanks for fixing it so quickly. I don't have access to the machine with the issue now. Will give it a try tomorrow.

Yang Yu (yang-yyu) wrote :

One of us tried the fix and it worked well. Thanks.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eglibc - 2.11.1-0ubuntu6

---------------
eglibc (2.11.1-0ubuntu6) lucid; urgency=low

  [ Kees Cook ]
  * [BZ #11333], Handle unnecessary padding in getdents64. LP: #392501.

  [ Matthias Klose ]
  * Apply from the 2.11-x86 branch:
    - Fix bugs in strcmp-sse4.S and strcmp-ssse3.S (H.J. Lu). LP: #563291.
    - Fix bugs in memcpy-ssse3. LP: #560135.
  * Assign global scope to RFC 1918 addresses in getaddrinfo(). Thanks
    Tore Anderson. LP: #555210.
  * Re-enable the local-ipv6-lookup patch. Addresses #417757.
 -- Matthias Klose <email address hidden> Sun, 18 Apr 2010 00:05:05 +0200

Changed in eglibc (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers