Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-149712

mlock()/munlock() functions assume page-aligned allocation

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.7
    • opensc
    • None
    • None
    • Low
    • rhel-security-crypto-clubs
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      When using its mlock() and munlock() functions, opensc makes the assumption that the memory block allocated is page-aligned. If used with blocks that were not allocated with glibc's allocation functions, then the opensc functions may leave some memory locked, leading to issues when applications access the locked memory.

      The biggest applications that run into this issue Chromium-derived browsers, which use their own allocation functions that don't guarantee that the blocks are aligned to pages. This causes Chromium to crash after using smartcard-based credentials to log into a website, for instance.

      This issue was identified in this upstream issue: https://github.com/OpenSC/OpenSC/issues/3267

      This comment describes the issue: https://github.com/OpenSC/OpenSC/issues/3267#issuecomment-2528615997

      And these upstream MRs were called out as potential fixes:
      https://github.com/OpenSC/OpenSC/pull/3282
      https://github.com/OpenSC/OpenSC/pull/3281

      These patches were included in OpenSC 0.26.1, which ships with RHEL 10, but opensc in earlier versions of RHEL do not include this patch; the ask here is to backport these patches to the earlier versions.

              jjelen@redhat.com Jakub Jelen
              rhn-support-amike Andrew Mike
              Jakub Jelen Jakub Jelen
              Georgios Stavros Pantelakis Georgios Stavros Pantelakis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: