[PATCH] xen/xenbus: handle pointer to NULL in alloc/free_pdev

2024-05-29 Thread yskelg
From: Yunseong Kim Modify 'alloc_pdev()' to set 'pdev->xdev' to NULL if 'xen_pcibk_init_devices()' fails. This ensures that 'pdev->xdev' does not point to 'xdev' when 'pdev' is freed. And modify 'free_pdev()' to set 'pdev' to NULL. Signed-off-by: Yunseong Kim --- drivers/xen/xen-pciback/xenbus

[PATCH] xen/xenbus: handle potential dangling pointer issue in xen_pcibk_xenbus_probe

2024-05-29 Thread yskelg
From: Yunseong Kim If 'xen_pcibk_init_devices()' fails. This ensures that 'pdev->xdev' does not point to 'xdev' when 'pdev' is freed. Signed-off-by: Yunseong Kim --- drivers/xen/xen-pciback/xenbus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/

[PATCH] loadpolicy: Verifies memory allocation during policy loading

2024-05-27 Thread yskelg
From: Yunseong Kim memory allocation failure handling in the loadpolicy module. Signed-off-by: Yunseong Kim --- tools/flask/utils/loadpolicy.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/flask/utils/loadpolicy.c b/tools/flask/utils/loadpolicy.c index 76710a256c..7f6bab4dcd 1