Skip to contentSkip to conversation

tools/xenstored: fix possible NULL deref

PATCH In review Juergen Gross 2 participants 2 messages Aug 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/xenstored: fix possible NULL deref

Avoid dereferencing NULL in introduce_domain() when called during live update.

Coverity ID: 1665111

Fixes f78895ad78c9 ("tools/xenstored: Read event channel from xenstored page")
---
 tools/xenstored/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xenstored/domain.c +1 -1
index 694d68670a..5ce539d640 100644
@@ -1032,7 +1032,7 @@ static struct domain *introduce_domain(const void *ctx,
 		if (!interface && !restore)
 			return NULL;
 
-		if (interface->evtchn_port)
+		if (!restore && interface->evtchn_port)
 			port = interface->evtchn_port;
 
 		if (new_domain(domain, port, restore)) {
Signature · 1 line
2.43.0