Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 8, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 8, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 8, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 8, 2025

      Xbox handheld leaks in new “Project Kennan” photos from the FCC — plus an ASUS ROG Ally 2 prototype with early specs

      May 8, 2025

      OpenAI plays into Elon Musk’s hands, ditching for-profit plan — but Sam Altman doesn’t have Microsoft’s blessing yet

      May 8, 2025

      “Are we all doomed?” — Fiverr CEO Micha Kaufman warns that AI is coming for all of our jobs, just as Bill Gates predicted

      May 8, 2025

      I went hands-on with dozens of indie games at Gamescom Latam last week — You need to wishlist these 7 titles right now

      May 8, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      NativePHP Hit $100K — And We’re Just Getting Started 🚀

      May 8, 2025
      Recent

      NativePHP Hit $100K — And We’re Just Getting Started 🚀

      May 8, 2025

      Mastering Node.js Streams: The Ultimate Guide to Memory-Efficient File Processing

      May 8, 2025

      Sitecore PowerShell commands – XM Cloud Content Migration

      May 8, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      8 Excellent Free Books to Learn Julia

      May 8, 2025
      Recent

      8 Excellent Free Books to Learn Julia

      May 8, 2025

      Janus is a general purpose WebRTC server

      May 8, 2025

      12 Best Free and Open Source Food and Drink Software

      May 8, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Security»Common Vulnerabilities and Exposures (CVEs)»CVE-2025-37814 – Linux Kernel TTY Mouse Reporting Vulnerability

    CVE-2025-37814 – Linux Kernel TTY Mouse Reporting Vulnerability

    May 8, 2025

    CVE ID : CVE-2025-37814

    Published : May 8, 2025, 7:15 a.m. | 58 minutes ago

    Description : In the Linux kernel, the following vulnerability has been resolved:

    tty: Require CAP_SYS_ADMIN for all usages of TIOCL_SELMOUSEREPORT

    This requirement was overeagerly loosened in commit 2f83e38a095f
    (“tty: Permit some TIOCL_SETSEL modes without CAP_SYS_ADMIN”), but as
    it turns out,

    (1) the logic I implemented there was inconsistent (apologies!),

    (2) TIOCL_SELMOUSEREPORT might actually be a small security risk
    after all, and

    (3) TIOCL_SELMOUSEREPORT is only meant to be used by the mouse
    daemon (GPM or Consolation), which runs as CAP_SYS_ADMIN
    already.

    In more detail:

    1. The previous patch has inconsistent logic:

    In commit 2f83e38a095f (“tty: Permit some TIOCL_SETSEL modes
    without CAP_SYS_ADMIN”), we checked for sel_mode ==
    TIOCL_SELMOUSEREPORT, but overlooked that the lower four bits of
    this “mode” parameter were actually used as an additional way to
    pass an argument. So the patch did actually still require
    CAP_SYS_ADMIN, if any of the mouse button bits are set, but did not
    require it if none of the mouse buttons bits are set.

    This logic is inconsistent and was not intentional. We should have
    the same policies for using TIOCL_SELMOUSEREPORT independent of the
    value of the “hidden” mouse button argument.

    I sent a separate documentation patch to the man page list with
    more details on TIOCL_SELMOUSEREPORT:
    https://lore.kernel.org/all/20250223091342.35523-2-gnoack3000@gmail.com/

    2. TIOCL_SELMOUSEREPORT is indeed a potential security risk which can
    let an attacker simulate “keyboard” input to command line
    applications on the same terminal, like TIOCSTI and some other
    TIOCLINUX “selection mode” IOCTLs.

    By enabling mouse reporting on a terminal and then injecting mouse
    reports through TIOCL_SELMOUSEREPORT, an attacker can simulate
    mouse movements on the same terminal, similar to the TIOCSTI
    keystroke injection attacks that were previously possible with
    TIOCSTI and other TIOCL_SETSEL selection modes.

    Many programs (including libreadline/bash) are then prone to
    misinterpret these mouse reports as normal keyboard input because
    they do not expect input in the X11 mouse protocol form. The
    attacker does not have complete control over the escape sequence,
    but they can at least control the values of two consecutive bytes
    in the binary mouse reporting escape sequence.

    I went into more detail on that in the discussion at
    https://lore.kernel.org/all/20250221.0a947528d8f3@gnoack.org/

    It is not equally trivial to simulate arbitrary keystrokes as it
    was with TIOCSTI (commit 83efeeeb3d04 (“tty: Allow TIOCSTI to be
    disabled”)), but the general mechanism is there, and together with
    the small number of existing legit use cases (see below), it would
    be better to revert back to requiring CAP_SYS_ADMIN for
    TIOCL_SELMOUSEREPORT, as it was already the case before
    commit 2f83e38a095f (“tty: Permit some TIOCL_SETSEL modes without
    CAP_SYS_ADMIN”).

    3. TIOCL_SELMOUSEREPORT is only used by the mouse daemons (GPM or
    Consolation), and they are the only legit use case:

    To quote console_codes(4):

    The mouse tracking facility is intended to return
    xterm(1)-compatible mouse status reports. Because the console
    driver has no way to know the device or type of the mouse, these
    reports are returned in the console input stream only when the
    virtual terminal driver receives a mouse update ioctl. These
    ioctls must be generated by a mouse-aware user-mode application
    such as the gpm(8) daemon.

    Jared Finder has also confirmed in
    https://lore.kernel.org/all/491f3df9de6593df8e70dbe77614b026@finder.org/
    that Emacs does not call TIOCL_SELMOUSEREPORT directly, and it
    would be difficult to find good reasons for doing that, given that
    it would interfere with the reports that GPM is sending.

    More information on the interaction between GPM, terminals and th
    —truncated—

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCVE-2025-37815 – “Microchip PCI1xxxx Linux Kernel IRQ Handler Registration Vulnerability”
    Next Article CVE-2025-37813 – Etron USB XHCI Invalid Pointer Dereference Vulnerability

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 9, 2025
    Security

    Microsoft Patches Four Critical Azure and Power Apps Vulnerabilities, Including CVSS 10 Privilege Escalation

    May 9, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Snal Linux – Arch based live distribution

    Linux

    Synology Network File System Vulnerability Let Read Any File

    Security

    Buying a Mac or iPad for school? You can get a $150 Apple gift card. Here’s how

    Development

    DALL·E Images Now Editable Directly in ChatGPT on Web and Mobile Platforms

    Development

    Highlights

    Development

    Leveraging AI to Enhance Threat Detection and Response Anomalies

    June 8, 2024

    By Srinivas Shekar, CEO and Co-Founder, Pantherun Technologies In the first quarter of 2024, the…

    Brisa 0.1.4 – 575% Performance Boost & Improved Windows Support

    November 4, 2024

    ns-3 – discrete-event network simulator

    January 6, 2025

    custom-blank-hoodie cheap bulk hoodies | bulk hoodie | blank hoodies wholesale | wholesale hoodies in bulk

    August 20, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.