[PATCH] of/irq: handle irq_of_parse_and_map() errors

2024-08-30 Thread Ma Ke
Zero and negative number is not a valid IRQ for in-kernel code and the irq_of_parse_and_map() function returns zero on error. So this check for valid IRQs should only accept values > 0. Cc: sta...@vger.kernel.org Fixes: f7578496a671 ("of/irq: Use irq_of_parse_and_map()") Signed-

Re: [PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-16 Thread Ma Ke
ence. Add NULL check to fix potential issue. > > > > Found by static analysis. > > > > Cc: sta...@vger.kernel.org > > Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") > > Signed-off-by: Ma Ke > > --- > > Changes in v4: > > - modified vul

[PATCH v4] cxl: Fix possible null pointer dereference in read_handle()

2024-07-14 Thread Ma Ke
: sta...@vger.kernel.org Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Ma Ke --- Changes in v4: - modified vulnerability description according to suggestions, making the process of static analysis of vulnerabilities clearer. No active research on developer behavio

[PATCH v3] cxl: Fix possible null pointer dereference in read_handle()

2024-07-14 Thread Ma Ke
/kernel/git/stable/linux.git/commit /?id=2d9adecc88ab678785b581ab021f039372c324cb Cc: sta...@vger.kernel.org Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Ma Ke --- Changes in v3: - fixed up the changelog text as suggestions. Changes in v2: - added an explanation

[PATCH v2] cxl: Fix possible null pointer dereference in read_handle()

2024-07-10 Thread Ma Ke
In read_handle(), of_get_address() may return NULL which is later dereferenced. Fix this by adding NULL check. Cc: sta...@vger.kernel.org Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Ma Ke --- Changes in v2: - The potential vulnerability was discovered as follows

[PATCH] cxl: Fix possible null pointer dereference in read_handle()

2024-07-09 Thread Ma Ke
In read_handle() of_get_address() may return NULL which is later dereferenced. Fix this bug by adding NULL check. Cc: sta...@vger.kernel.org Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Ma Ke --- drivers/misc/cxl/of.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-06-28 Thread Ma Ke
We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke --- drivers/usb/gadget/udc/fsl_qe_udc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc