[PATCH 1/1] ALSA: opl3: fix infoleak in opl3

2020-07-05 Thread Xidong Wang
From: xidongwang The stack object “info” in snd_opl3_ioctl() has a leaking problem. It has 2 padding bytes which are not initialized and leaked via “copy_to_user”. Signed-off-by: xidongwang --- sound/drivers/opl3/opl3_synth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/drivers/

[PATCH 1/1] openvswitch: fix infoleak in conntrack

2020-06-15 Thread Xidong Wang
From: xidongwang The stack object “zone_limit” has 3 members. In function ovs_ct_limit_get_default_limit(), the member "count" is not initialized and sent out via “nla_put_nohdr”. Signed-off-by: xidongwang --- net/openvswitch/conntrack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/

[PATCH 1/1] RDMA/core: Don't copy uninitialized stack memory to userspace

2020-06-09 Thread Xidong Wang
From: xidongwang ib_uverbs_create_ah() may copy stack allocated structs to userspace without initializing all members of these structs. Clear out this memory to prevent information leaks. Signed-off-by: xidongwang --- drivers/infiniband/core/uverbs_cmd.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 1/1] clocksource/drivers/integrator: check return value

2019-05-29 Thread Xidong Wang
In integrator_ap_timer_init_of(), the return value of clk_prepare_enable() should be checked before clk is used. Signed-off-by: Xidong Wang --- drivers/clocksource/timer-integrator-ap.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-integrator

[PATCH 1/1] rtc: rv3028: check return value

2019-05-29 Thread Xidong Wang
In rv3028_probe(), the return value of devm_regmap_init_i2c() should be checked before it is used. Signed-off-by: Xidong Wang --- drivers/rtc/rtc-rv3028.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c index 06884eb..29a8c4e 100644

[PATCH 1/1] scsi: esas2r: esas2r_init: check return value

2019-05-28 Thread Xidong Wang
In esas2r_resume(), the return value of pci_enable_device() is not checked before pdev is used. Signed-off-by: Xidong Wang --- drivers/scsi/esas2r/esas2r_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c index

[PATCH 1/1] drm/i915: Do not use kfree() to free kmem_cache_alloc() return value

2018-04-04 Thread Xidong Wang
In eb_lookup_vmas(), the return value of kmem_cache_alloc() is freed with kfree(). I think the expected paired function is kmem_cahce_free(). Signed-off-by: Xidong Wang --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 1/1] drm/i915:Do not use kfree() to free kmem_cache_alloc() return value

2018-04-03 Thread Xidong Wang
In eb_lookup_vmas(), lut, the return value of kmem_cache_alloc(), is freed with kfree().I think the expected paired function is kmem_cache_free(). Signed-off-by: Xidong Wang --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 1/1] dmaengine:jz4740:fix memory leak

2018-04-03 Thread Xidong Wang
In function jz4740_dma_probe(), the memory allocated by clk_get() is not released on the error path that ret, which holds the return value of dma_async_device_register(), is not NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/dma/dma-jz4740.c | 1 + 1 file

[PATCH 1/1] mtd:nand:fix memory leak

2018-04-03 Thread Xidong Wang
In function tango_nand_probe(), the memory allocated by clk_get() is not released on the normal path and the error path that IS_ERR(nfc->chan) returns true. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/mtd/nand/tango_nand.c | 5 - 1 file changed

[PATCH 1/1] scsi:mvsas:fix memory leak

2018-04-03 Thread Xidong Wang
In function mvs_pci_init(), the memory allocated by scsi_host_alloc() is not released on the error path that mvi, which holds the return value of mvs_pci_alloc(), is NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/scsi/mvsas/mv_init.c | 4 +++- 1 file changed

[PATCH 1/1] scsi: mvsas:fix memory leak

2018-04-03 Thread Xidong Wang
In function mvs_pci_init(), the memory allocated by scsi_host_alloc() is not released on the error path that mvi, which holds the return value of mvs_pci_alloc(), is NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- drivers/scsi/mvsas/mv_init.c | 1 + 1 file changed, 1

[PATCH 1/1] z3fold: fix memory leak

2018-04-03 Thread Xidong Wang
In function z3fold_create_pool(), the memory allocated by __alloc_percpu() is not released on the error path that pool->compact_wq , which holds the return value of create_singlethread_workqueue(), is NULL. This will result in a memory leak bug. Signed-off-by: Xidong Wang --- mm/z3fold.c

[PATCH 1/1] taging: fbtft: fix memory leak

2018-04-03 Thread Xidong Wang
From: Xidong Wang <2711406...@qq.com> In function fbtft_framebuffer_alloc(), the memory allocated by framebuffer_alloc() is not released on the error path that txbuflen > 0 and txbuf, which holds the return value of devm_kzalloc(), is NULL. This will result in a memory leak bug. Sign

[PATCH 1/1] taging: fbtft: fix memory leak

2018-04-03 Thread Xidong Wang
From: Xidong Wang <2711406...@qq.com> In function fbtft_framebuffer_alloc(), the memory allocated by framebuffer_alloc() is not released on the error path that txbuflen > 0 and txbuf, which holds the return value of devm_kzalloc(), is NULL. This will result in a memory leak bug. Sign