Bug 1192400
Summary: | qemu: reject '/' in <shmem name=XXX/> | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Andrew Jones <drjones> |
Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | berrange, crobinso, skobyda |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | LibvirtFirstBug | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-03-26 20:08:01 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andrew Jones
2015-02-13 09:56:42 UTC
Actually for the example in the description (shmem). A single '/' could be allowed, as long as it's the first character of the name. Knowing how shmem-name is used (by shm_open), we see that "/NAME" is POSIX compliant, and is even required on some systems to allow opening a pre-existing object of the same name. The behavior of opening a pre-existing object without the slash is implementation defined per POSIX. But, this complicates libvirt, and allows some QEMU internals knowledge to leak into it (we have to know that QEMU uses shm_open on this particular name element), so I'm not sure if it should be considered. Linux doesn't care if the slash is there or not, pre-existing objects are opened as if it was. I think that's probably obscure enough that we can just unconditionally block use of '/' in names and not cause problems for apps/users. This should probably be fine to validate in qemuDomainPostParse, since presumably there isn't any previous configs we need to worry about. Tagging as LibvirtFirstBug Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2018-July/msg00586.html commit 9ff956b26aba64e1519a338197891ac53f033e7f Author: Simon Kobyda <skobyda> Date: Wed Aug 1 17:50:03 2018 +0200 conf: virDomainDefValidateInternal prohibit some characters in shmem name |