User was getting error and kicked out of PSMP session while using vim command

User was getting error and kicked out of PSMP session while using vim command

95
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:53 PM


Symptom


When user runs VIM via PSMP-SSH, an error might be generated and the session is immediately ended with error below:

channel_handle_rfd: channel 0: PSServices Input fatal error occured [Error: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate.] 

Connection to psmp.abcd.com closed.

This could be happen on specific target server only. 



Environment


12.5;12.6;13.0;13.2;14.0;14.2;14.4;14.6 Privileged Access Manager (PAM, self-hosted) PSMP PSMP Crashing

Cause


The ShellPromptForAudit regular expression, configured at either the connection component or platform level, is resulting in excessive output accumulation and has caused the output buffer to overflow. 



Resolution


PSMP continuously evaluates the shell prompt to audit keystrokes in real time.

When launching vi, the editor refreshes the entire terminal screen, generating a large, single output buffer. The complex regular expression defined in the ShellPromptForAudit parameter must process this entire buffer, which can exceed the system's output buffer limit.

In contrast, launching nano results in multiple smaller output buffers, which should be avoiding this buffer overflow error.

To prevent such issues, it is considered best practice to use optimized and efficient regular expressions. Alternatively, advise users to work with lighter-weight editors such as nano.

Recommended Solution:
Simplify the ShellPromptForAudit pattern. Begin with a basic pattern such as .* to validate functionality, and then refine it to suit the actual shell prompt format on the target system.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000r2jCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail