Skip to content

Commit 4f1e524

Browse files
committed
qrexec-daemon: Do not check service identifier for DEFAULT: keyword
Service identifiers are not allowed to contain ":", so this cannot be triggered by a malicious VM, and the subsequent code is secure against malicious input, so it would be harmless even if it _could_ be triggered. Nevertheless, it is cleaner to not do the check.
1 parent e98ed7a commit 4f1e524

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

daemon/qrexec-daemon.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ static int handle_cmdline_body_from_client(int fd, struct msg_header *hdr)
620620
}
621621
}
622622

623-
if (!strncmp(buf, default_user_keyword, default_user_keyword_len_without_colon+1)) {
623+
if ((hdr->type != MSG_SERVICE_CONNECT) &&
624+
(strncmp(buf, default_user_keyword, default_user_keyword_len_without_colon+1) == 0))
625+
{
624626
use_default_user = 1;
625627
hdr->len -= default_user_keyword_len_without_colon;
626628
hdr->len += strlen(default_user);

0 commit comments

Comments
 (0)