[PATCH v2] usb: gadget: dummy_hcd: fix gpf in gadget_setup

2021-04-18 Thread Anirudh Rayabharam
ested-by: Alan Stern Reported-by: syzbot+eb4674092e6cc8d9e...@syzkaller.appspotmail.com Acked-by: Alan Stern Signed-off-by: Anirudh Rayabharam --- Changes in v2: Improvements in the comment as suggested by Alan Stern. v1: https://lore.kernel.org/lkml/20210417125212.6274-1-m...@a

[PATCH] usb: gadget: dummy_hcd: fix gpf in gadget_setup

2021-04-17 Thread Anirudh Rayabharam
ested-by: Alan Stern Reported-by: syzbot+eb4674092e6cc8d9e...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam --- drivers/usb/gadget/udc/dummy_hcd.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/

Re: [syzbot] general protection fault in gadget_setup

2021-04-16 Thread Anirudh Rayabharam
On Fri, Apr 16, 2021 at 11:27:34AM -0400, Alan Stern wrote: > On Fri, Apr 16, 2021 at 11:10:35AM +0530, Anirudh Rayabharam wrote: > > On Tue, Apr 13, 2021 at 12:13:11PM -0400, Alan Stern wrote: > > > Maybe we can test this reasoning by putting a delay just before the call &g

Re: [syzbot] general protection fault in gadget_setup

2021-04-15 Thread Anirudh Rayabharam
On Tue, Apr 13, 2021 at 12:13:11PM -0400, Alan Stern wrote: > On Tue, Apr 13, 2021 at 10:12:05AM +0200, Dmitry Vyukov wrote: > > On Tue, Apr 13, 2021 at 10:08 AM syzbot > > wrote: > > > > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:0f4498ce Merge tag 'fo

Re: [PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-14 Thread Anirudh Rayabharam
On Wed, Apr 14, 2021 at 12:55:40PM +, Luis Chamberlain wrote: > Shuah, a question for you toward the end here. > > On Wed, Apr 14, 2021 at 02:24:05PM +0530, Anirudh Rayabharam wrote: > > This use-after-free happens when a fw_priv object has been freed but > > hasn&#x

Re: [PATCH v2] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-14 Thread Anirudh Rayabharam
On Tue, Apr 13, 2021 at 04:51:38PM +, Luis Chamberlain wrote: > On Tue, Apr 13, 2021 at 04:12:42PM +0530, Anirudh Rayabharam wrote: > > The use-after-free happens when a fw_priv object has been freed but > > hasn't been removed from the pending list (pending_fw_head

[PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-14 Thread Anirudh Rayabharam
ad, just jump out and return early. Fixes: bcfbd3523f3c ("firmware: fix a double abort case with fw_load_sysfs_fallback") Reported-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com Tested-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam -

Re: [PATCH v2] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-13 Thread Anirudh Rayabharam
On Tue, Apr 13, 2021 at 04:51:38PM +, Luis Chamberlain wrote: > On Tue, Apr 13, 2021 at 04:12:42PM +0530, Anirudh Rayabharam wrote: > > The use-after-free happens when a fw_priv object has been freed but > > hasn't been removed from the pending list (pending_fw_head

[PATCH v2] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-13 Thread Anirudh Rayabharam
OENT instead of skipping the entire block. Fixes: bcfbd3523f3c ("firmware: fix a double abort case with fw_load_sysfs_fallback") Reported-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com Tested-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabhar

[PATCH] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-13 Thread Anirudh Rayabharam
of skipping the entire block. Fixes: bcfbd3523f3c ("firmware: fix a double abort case with fw_load_sysfs_fallback") Reported-and-tested-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam --- drivers/base/firmware_loader/fallback.c | 9 +++

Re: [PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-07 Thread Anirudh Rayabharam
On Tue, Apr 06, 2021 at 04:39:21PM -0700, David Miller wrote: > From: Anirudh Rayabharam > Date: Tue, 6 Apr 2021 18:13:59 +0530 > > > Multiple ttys try to claim the same the minor number causing a double > > unregistration of the same device. The first unregistration succ

[PATCH v2] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-07 Thread Anirudh Rayabharam
9fe6089f295a05e...@syzkaller.appspotmail.com Tested-by: syzbot+c49fe6089f295a05e...@syzkaller.appspotmail.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Anirudh Rayabharam --- Changes in v2: 1. Fixed unused variable warning 2. Added "Fixes:" tag 3. Added the "Reviewed-by:" tags th

Re: [PATCH] media: pvrusb2: fix warning in pvr2_i2c_core_done

2021-04-07 Thread Anirudh Rayabharam
On Tue, Apr 06, 2021 at 11:38:25AM +0200, Hans Verkuil wrote: > On 01/04/2021 14:33, Anirudh Rayabharam wrote: > > syzbot has reported the following warning in pvr2_i2c_done: > > > > sysfs group 'power' not found for kobject '1-0043'

[PATCH v2] media: pvrusb2: fix warning in pvr2_i2c_core_done

2021-04-07 Thread Anirudh Rayabharam
_hdw_disconnect from pvr2_hdw_destroy. Reported-by: syzbot+e74a998ca8f1df9cc...@syzkaller.appspotmail.com Tested-by: syzbot+e74a998ca8f1df9cc...@syzkaller.appspotmail.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Anirudh Rayabharam --- syzbot test run result: https://groups.google.com/g/syzkaller-

Re: [PATCH] media: pvrusb2: fix warning in pvr2_i2c_core_done

2021-04-06 Thread Anirudh Rayabharam
On Tue, Apr 06, 2021 at 11:38:25AM +0200, Hans Verkuil wrote: > On 01/04/2021 14:33, Anirudh Rayabharam wrote: > > syzbot has reported the following warning in pvr2_i2c_done: > > > > sysfs group 'power' not found for kobject '1-0043'

[PATCH] net: hso: fix null-ptr-deref during tty device unregistration

2021-04-06 Thread Anirudh Rayabharam
yzbot+c49fe6089f295a05e...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam --- drivers/net/usb/hso.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 31d51346786a..295ca330e70c 100644 --- a/dr

[PATCH] media: pvrusb2: fix warning in pvr2_i2c_core_done

2021-04-01 Thread Anirudh Rayabharam
_hdw_disconnect from pvr2_hdw_destory. Reported-and-tested-by: syzbot+e74a998ca8f1df9cc...@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c

[PATCH] ACPI: fix build warning in processor_idle.c

2021-03-31 Thread Anirudh Rayabharam
GCC shows the following warning during build: drivers/acpi/processor_idle.c: In function ‘acpi_idle_play_dead’: drivers/acpi/processor_idle.c:542:15: warning: extra tokens at end of #ifdef directive Fix by replacing "ifdef" with "if". Signed-off-by: Anirudh Rayabhara

[PATCH resend] jfs: fix use-after-free in lbmIODone

2021-03-22 Thread Anirudh Rayabharam
...@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: Anirudh Rayabharam --- fs/jfs/jfs_logmgr.c | 17 ++--- fs/jfs/jfs_logmgr.h | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 9330eff210e0..82d20c4687aa

[PATCH] jfs: fix use-after-free in lbmIODone

2021-03-15 Thread Anirudh Rayabharam
...@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: Anirudh Rayabharam --- fs/jfs/jfs_logmgr.c | 17 ++--- fs/jfs/jfs_logmgr.h | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 9330eff210e0..82d20c4687aa

Re: [PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse

2021-02-12 Thread Anirudh Rayabharam
On Fri, Feb 12, 2021 at 03:43:10PM +0100, Greg KH wrote: > On Fri, Feb 12, 2021 at 08:00:25PM +0530, Anirudh Rayabharam wrote: > > On Thu, Feb 11, 2021 at 09:35:27PM +0100, Greg KH wrote: > > > On Fri, Feb 12, 2021 at 01:59:08AM +0530, Anirudh Rayabharam wrote: > > &

[PATCH v2] staging: wimax/i2400m: fix some byte order issues found by sparse

2021-02-12 Thread Anirudh Rayabharam
:right side has type restricted __le32 wimax/i2400m/fw.c:196:32: warning: restricted __le32 degrades to integer wimax/i2400m/fw.c:196:47: warning: restricted __le32 degrades to integer wimax/i2400m/fw.c:196:66: warning: restricted __le32 degrades to integer Signed-off-by: Anirudh Rayabharam

Re: [PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse

2021-02-12 Thread Anirudh Rayabharam
On Thu, Feb 11, 2021 at 09:35:27PM +0100, Greg KH wrote: > On Fri, Feb 12, 2021 at 01:59:08AM +0530, Anirudh Rayabharam wrote: > > Fix sparse byte-order warnings in the i2400m_bm_cmd_prepare() > > function: > > > > wimax/i2400m/fw.c:194:36: warning: restricted __le32 de

[PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse

2021-02-11 Thread Anirudh Rayabharam
:right side has type restricted __le32 wimax/i2400m/fw.c:196:32: warning: restricted __le32 degrades to integer wimax/i2400m/fw.c:196:47: warning: restricted __le32 degrades to integer wimax/i2400m/fw.c:196:66: warning: restricted __le32 degrades to integer Signed-off-by: Anirudh Rayabharam

Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning

2019-03-30 Thread Anirudh Rayabharam
On Wed, Mar 27, 2019 at 11:49:07PM +0530, Anirudh Rayabharam wrote: > Checkpatch.pl complains that these lines are over 80 characters. Use the > "psecuritypriv" pointer for consistency, remove unnecessary parantheses > and fix the alignment. > > This patch just cleans u

[PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning

2019-03-27 Thread Anirudh Rayabharam
Checkpatch.pl complains that these lines are over 80 characters. Use the "psecuritypriv" pointer for consistency, remove unnecessary parantheses and fix the alignment. This patch just cleans up a condition, it doesn't affect runtime. Signed-off-by: Anirudh Rayabharam --- v2:

[PATCH] staging: rtl8723bs: core: fix line over 80 characters warning

2019-03-26 Thread Anirudh Rayabharam
Shorten the expression by re-using the part that was already computed to fix the line over 80 characters warning reported by checkpatch.pl. Signed-off-by: Anirudh Rayabharam --- drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a