Menu

1 / 2

A missing `if` let remote input bypass Android's keyboard permission in RustDesk

DEV Community: security·zerox80·1 day ago
#WBDGrDA5
#devtosecurity#devto#dev#android#keyboard
Reading 0:00
15s threshold

One if statement existed on Windows, macOS and Linux. It was missing on Android.

That is the whole bug. It let a remote peer keep typing and clicking on an Android

device after its keyboard permission had been explicitly revoked. I found it in

RustDesk 1.5.3, reproduced it on an API 35 emulator, and the upstream fix is now

public as rustdesk/rustdesk#17061 .

First, what "keyboard permission" actually means

This is the part that trips people up, so let's be precise. It is not about

whether the Android device has a keyboard. Gboard still works for the person

holding the phone.

RustDesk sessions carry per-capability flags. The relevant one is:

// src/server/connection.rs:2344-2346 fn peer_keyboard_enabled ( & self ) -> bool { self . keyboard && ! self . disable_keyboard }

Enter fullscreen mode

Exit fullscreen mode

self.keyboard is set to false for limited sessions (file transfer, terminal,

view-camera).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.