Repository navigation
feat(multi-pc): a Windows remote says when UIPI drops what it injects - #818
Merged
Merged
Conversation
A remote whose agent is not elevated injects nothing while a window of a
higher integrity level has the focus (osk.exe, Task Manager, an elevated
program): the pointer froze there and the master's came back blind, with
nothing said. SendInput does not report a UIPI block, so the hook compares
the foreground's integrity level (and its own UIAccess) with its own.
- lbm-hook: remote::blocking decides and reports (pure, tested);
remote/windows/foreground follows EVENT_SYSTEM_FOREGROUND on a thread of
its own, only between a session's begin and its park. A short SendInput
(secure desktop) counts as a block too. Event::InjectionBlocked.
- lbm-net: Control::InjectionBlocked, remote -> master, sent only to a
master that announced the InjectionBlocked capability; both roles
announce it. Sends are chained so a block and its end keep their order.
- Master: PeerEntry::injection_blocked while linked; Snapshot lists the
blocked remotes. A block said while the pointer is over there ends the
hop, as InputReset does: the pointer comes home instead of staying frozen.
- lbm-app/lbm-ui (Machines page) and the tray say: "Windows blocks the
mouse and keyboard on <name>: an elevated window has the focus" and how
to get out of it ("Start with elevated privileges").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e as a master does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the vm124 trial On the vm124 the foreground event once missed osk.exe taking the focus (the hook's own focus hook missed it as well), and the block was said only at the next crossing. Each batch now compares the foreground window with the one last judged: one GetForegroundWindow per batch, judged again only when it changed; no timer, nothing between sessions. docs/multi-pc-etat.md: the trial (osk.exe and an elevated mmc.exe, hook not elevated then elevated) and the limits that remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mgth
commented
Nov 24, 2026
mgth
left a comment
Owner
Author
There was a problem hiding this comment.
Les deux tests d’intégration sur la remontée du blocage passent sur boucle locale. Deux points restent à corriger dans le diagnostic. Je les ai vérifiés par lecture du chemin Windows, sans essai sur une session Windows.
mgth
commented
Nov 24, 2026
mgth
left a comment
Owner
Author
There was a problem hiding this comment.
La branche est toujours sur 46be2412. Les deux remarques sur le changement de focus et le diagnostic d’envoi incomplet restent ouvertes. La fusion avec v6 (6e3b50d6) présente désormais deux conflits, vérifiés avec git merge-tree, dans rust/crates/lbm-agent/src/api.rs et rust/crates/lbm-agent/src/tray/mod.rs. Lors de la résolution, conserver à la fois le diagnostic de blocage Windows et l’affichage des autres outils de partage ajouté par #814.
# Conflicts: # docs/multi-pc-etat.md # rust/crates/lbm-agent/src/api.rs # rust/crates/lbm-agent/src/peers/actor.rs # rust/crates/lbm-agent/src/runtime.rs # rust/crates/lbm-agent/src/tray/mod.rs # rust/crates/lbm-ui/src/machines.rs # rust/crates/lbm-ui/tests/machines.rs
…e as such Review of #818: - A WinEvent is queued: judging the window it names could say a block for an elevated window already gone, after a batch saw an ordinary one back, and the master would end a crossing that works. The event now only says "look again": every observation (session start, event, batch) reads the foreground, judges it and says it under one lock (blocking::Watch), so nothing is said out of the order it was read. - A short SendInput with no integrity difference seen (a secure desktop) is no longer shown as an elevated window: InjectionBlock carries a cause (Integrity, the default when absent, or Unknown, also what an unknown cause reads as). Only Integrity advises "Start with elevated privileges", on the Machines page and in the tray; the pointer still comes home either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problème
Cas réel du 2026-11-24 (maître Linux, esclave Windows 11 vm124, agent esclave non élevé) : le clavier visuel (
osk.exe, processus UIAccess de niveau High) prend le focus après un clic sur son icône dans la barre des tâches. UIPI jette alors tout ce que le hook esclave injecte, mouvement compris : le pointeur reste figé sur l'esclave, celui du maître revient à l'aveugle, et rien ne dit pourquoi.Ce que fait la PR
lbm-hook/src/remote/blocking.rs,remote/windows/foreground.rs) :SendInputne signale pas un blocage UIPI (la doc le dit, il compte comme envoyé ce qu'il jette). Le hook compare donc le niveau d'intégrité du processus de la fenêtre au premier plan avec le sien, et son propre UIAccess. Le premier plan est suivi parEVENT_SYSTEM_FOREGROUNDsur un fil dédié, seulement entre le début d'une session pilotée et son rangement ; aucune scrutation. UnSendInputincomplet (bureau sécurisé) compte aussi comme blocage. Nouvel événement hookInjectionBlocked { Block }.Control::InjectionBlocked, seulement vers un maître qui annonce la capacitéInjectionBlockeddans sonHello(les deux rôles l'annoncent). Les envois sont chaînés pour qu'un blocage et sa fin arrivent dans l'ordre.PeerEntry::InjectionBlockeddans l'étatPeers,Snapshot::InjectionBlockedpour le tray. Page Machines et tray : « Windows blocks the mouse and keyboard on : an elevated window has the focus… Turn on "Start with elevated privileges" ».InputReset(hook.restart()) : le pointeur revient chez le maître au lieu de rester figé là-bas. Une session qui recommence bloquée le redit, donc chaque nouvelle traversée revient aussi.examples/peer_driveannonce la capacité, affiche les blocages et ramène le pointeur comme le ferait le maître.Tests
remote::blocking: intégrités simulées (osk High+UIAccess vs hook Medium, hook élevé, hook UIAccess, jeton illisible, pas de premier plan) et règles de report (changement, début de session bloquée, envoi incomplet).tests/peers.rs: capacité absente → rien n'est envoyé ; capacité présente → blocage puis fin, dans l'ordre ; côté maître, blocage pendant la traversée → connexion au hook fermée,Leaveenvoyé, état etblocked_remotesrenseignés, effacés à la fin du lien.Controlsur le fil ; lecture de l'état danslbm-app(le blocage ne reconstruit pas la carte) ; texte du tray et de la page.cargo clippy --workspace --all-targetspropre sous Linux et--target x86_64-pc-windows-gnu. En local, seulsupervise::an_absent_hook_is_launched_detached_and_outlives_the_agentéchoue (cas connu : un vrai hook tourne sur la machine).Essai réel (vm124, 2026-11-24)
Hook de cette branche lancé à côté de l'installation du mainteneur (
LBM_HOOK_ENDPOINT, aucun binaire remplacé), piloté par un client local qui joue le rôle de l'agent relais :mmc.exeélevé (console du mainteneur) au premier planInjectionBlocked blocked by mmc.exedès l'Enter, redit à la traversée suivante ; curseur figéosk.exeHigh + UIAccess)osk.exeprend le focus ~300 ms après le survol ; blocage signalé à cet instant (5 fois sur 6 par l'événement, la 6e seulement à la traversée suivante → filet ajouté : chaque lot compare le premier plan, c4bd07c), curseur figémmc.exepuisosk.exeau premier planSendInputavec une fenêtre élevée au premier planGetLastError= 0 : confirme qu'il ne signale pas UIPIPas essayé en réel : la chaîne agent esclave → réseau → maître (le mutex « un agent par session » empêche un second agent à côté de celui du mainteneur, qu'il ne fallait pas arrêter) ; elle est couverte par
tests/peers.rssur boucle locale. Le retour du pointeur chez le maître n'a donc été vu qu'en test.🤖 Generated with Claude Code