[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.13] xen/xsm: flask: Prevent NULL deference in flask_assign_{, dt}device()


  • To: Julien Grall <julien.grall@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Date: Fri, 4 Oct 2019 13:58:36 -0400
  • Cc: jgross@xxxxxxxx, paul@xxxxxxx
  • Delivery-date: Fri, 04 Oct 2019 17:58:43 +0000
  • Ironport-phdr: 9a23:nIRnqBA1FGwBkj+NkUUwUyQJP3N1i/DPJgcQr6AfoPdwSP37psSwAkXT6L1XgUPTWs2DsrQY0rGQ7vmrADVZqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba58IRmsrQjdq8YajZZ/Jqos1xDEvmZGd+NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLDTRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljjoMOiUn+2/LlMN/kKNboAqgpxNhxY7UfJqVP+d6cq/EYN8WWXZNUsNXWiNPGIO8a5YEAfQHM+hWsoLxo0ICoBW6CAWpAu7k1z1GiWLs3aAizuovDw/G0gwnH9wNvnrbotr6O6UOXu6616TI0TfOYulK1Tvh5oXFcBYsquyMU7JqdsrRzFEiGQ3fgVWWqIzqITeV3fkDvWeF8uFuVPivhHQ9pAF/vzOiwdojiobUiY0LxVDE7z92zZ0pJdy4VEF7YdmkHIFWtyGBLYR6WMwiQ2Z2uCsjzLANpJ21fDASxZg6yBPSZOaLfoiV7h75SuqcLil0iGh4dL+5mh2861KvyvfmWcmxyFtKqy1FncTSuX0VzBzT79SHSuN6/ke8xTaDzwDT5f9AIUAzjafbN4QuwqQxlpoOqkTPBDP2mUXqg6+WcUUo4O6o5Pj8Yrr6vJOcMo50igXmPqQvnMywH/g4PxATU2WU9umwzr3u8VDjTLlUgfA6jLPVvI3CKcQevKG5AgtV0og56xa4CjeryMkXnXYaI11bdxKHlZLmNkrSIPH4Efi/g1OsnC1tx/DdJLLtGJrNLn/dkLv5Z7Zy91ZcyBYvzdBY/59UCKwBIPbyWkDvstzUFBA5MxauzObjDNVwzZkRWXiKAqODLKzStlqI7Po1I+aQfI8VpCr9K/896v/hk3A5n0YRcrS30psJdn+4Gu9rI0GYYXr3ntcBCn0GvwUgQ+zskF2CSzlTZ3SsUK0g+jE3EoWmDZ3MRoq1mryOwD+7HoFKZmBBEl2ME3jod5+DW/cXcyKfOdRhkiEfVbe/UYMuyRautAriwbp9MuXU4jEYtY7k1NVt/+3cjwwy9ThvAsWSzW6NSXt4nmQSRz85j+hDphlf11OC3K4wrOZREdgbs/FUVgY3M9jT1eV+D/j7QAeHddCMHhLuUtigRD08UN8169sPeFpmXcWviAjZ2CinCKNTkKaEV7Iu9aeJ83H3Jst5g1rLnIY7hlAoCp9DOmGribR23xTCDI7O1UOCnuClcrpKj32Fz3uK0Wfb5BIQawV3S6iQGClEN0Y=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/4/19 12:42 PM, Julien Grall wrote:
flask_assign_{, dt}device() may be used to check whether you can test if
a device is assigned. In this case, the domain will be NULL.

However, flask_iommu_resource_use_perm() will be called and may end up
to deference a NULL pointer. This can be prevented by moving the call
after we check the validity for the domain pointer.

Coverity-ID: 1486741
Fixes: 71e617a6b8 ('use is_iommu_enabled() where appropriate...')
Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.