Skip to content

Commit 639b088

Browse files
committed
xen: xenbus driver must not accept invalid transaction ids
When accessing Xenstore in a transaction the user is specifying a transaction id which he normally obtained from Xenstore when starting the transaction. Xenstore is validating a transaction id against all known transaction ids of the connection the request came in. As all requests of a domain not being the one where Xenstore lives share one connection, validation of transaction ids of different users of Xenstore in that domain should be done by the kernel of that domain being the multiplexer between the Xenstore users in that domain and Xenstore. In order to prohibit one Xenstore user "hijacking" a transaction from another user the xenbus driver has to verify a given transaction id against all known transaction ids of the user before forwarding it to Xenstore. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
1 parent 2f60b28 commit 639b088

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/xenbus/xenbus_dev_frontend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int xenbus_write_transaction(unsigned msg_type,
316316
rc = -ENOMEM;
317317
goto out;
318318
}
319-
} else if (msg_type == XS_TRANSACTION_END) {
319+
} else if (u->u.msg.tx_id != 0) {
320320
list_for_each_entry(trans, &u->transactions, list)
321321
if (trans->handle.id == u->u.msg.tx_id)
322322
break;

0 commit comments

Comments
 (0)