[PATCH v4 2/3] usb: misc: ezusb: update to use usb_control_msg_send()

2021-03-26 Thread Anant Thazhemadam
() appropriately. Signed-off-by: Anant Thazhemadam Reviewed-by: Johan Hovold --- drivers/usb/misc/ezusb.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/usb/misc/ezusb.c b/drivers/usb/misc/ezusb.c index f058d8029761..78aaee56c2b7 100644 --- a/drivers/usb/misc

[PATCH v4 3/3] usb: misc: usbsevseg: update to use usb_control_msg_send()

2021-03-26 Thread Anant Thazhemadam
() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbsevseg.c | 60 ++-- 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c index 551074f5b7ad..4bc816bb09bb 100644 --- a/drivers/usb

[PATCH v4 0/3] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API

2021-03-26 Thread Anant Thazhemadam
they have a variable length (since that threw a warning). * Link to v1: https://lore.kernel.org/linux-usb/20201129160612.1908074-1-anant.thazhema...@gmail.com/ Anant Thazhemadam (3): usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API usb: misc: ezusb: upda

[PATCH v4 1/3] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API

2021-03-26 Thread Anant Thazhemadam
}() appropriately. Now, we also test for a short device descriptor (which USB core should already have fetched if you get to probe this driver), but which wasn't verified again here before. Signed-off-by: Anant Thazhemadam Reviewed-by: Peter Chen Reviewed-by: Johan Hovold --- drivers/usb/misc/ehset.c

Re: [PATCH v3 01/12] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Anant Thazhemadam
On 27/01/21 7:28 pm, Johan Hovold wrote: > On Wed, Jan 27, 2021 at 12:03:52AM +0530, Anant Thazhemadam wrote: >> The newer usb_control_msg_{send|recv}() API are an improvement on the >> existing usb_control_msg() as it ensures that a short read/write is treated > As I mentio

Re: [PATCH v3 02/12] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()

2021-01-27 Thread Anant Thazhemadam
On 27/01/21 7:39 pm, Johan Hovold wrote: > On Wed, Jan 27, 2021 at 12:03:53AM +0530, Anant Thazhemadam wrote: >> The newer usb_control_msg_{send|recv}() API are an improvement on the >> existing usb_control_msg() as it ensures that a short read/write is treated > Short wri

[RESEND PATCH v3 12/12] usb: misc: usbtest: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- Resending this patch since the subject line for the initial submission (sent as a part of the patch series) wasn't set

Re: [PATCH v3 12/12] [PATCH v3 12/12] usb: misc: usbtest: update to use the, usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
Looks like the subject line got messed up for patch 12/12. I'm sorry about that. Do I have to resend the patch? Thanks, Anant

[no subject]

2021-01-26 Thread Anant Thazhemadam
usb pipes need not be created in the calling functions. For this reason, instances of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc

[PATCH v3 11/12] usb: misc: usbsevseg: update to use usb_control_msg_send()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbsevseg.c | 60 ++-- 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc

[PATCH v3 09/12] usb: misc: lvstest: update to use the usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/lvstest.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions

[PATCH v3 10/12] usb: misc: trancevibrator: update to use usb_control_msg_send()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() and the return value checking condition has also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/trancevibrator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc

[PATCH v3 06/12] usb: misc: iowarrior: update to use the usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/iowarrior.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc

[PATCH v3 08/12] usb: misc: ldusb: update to use usb_control_msg_send()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg_send() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ldusb.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 670e4d91e9ca..259ead4edecb

[PATCH v3 07/12] usb: misc: isight_firmware: update to use usb_control_msg_send()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send(), and return value checking has also been appropriately enforced. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/isight_firmware.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git

[PATCH v3 04/12] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam Reviewed-by: Peter Chen --- drivers/usb/misc/ehset.c | 76 +--- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/drivers/usb/misc/ehset.c

[PATCH v3 05/12] usb: misc: ezusb: update to use usb_control_msg_send()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ezusb.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/usb/misc/ezusb.c b/drivers/usb/misc/ezusb.c index f058d8029761

[PATCH v3 03/12] usb: misc: cytherm: update to use usb_control_msg_recv()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). The return value checking enforced by callers of the updated function have also been appropriately updated. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cytherm.c | 128 + 1 file changed, 43

[PATCH v3 00/12] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
hat threw a warning). * Link to v1: https://lore.kernel.org/linux-usb/20201129160612.1908074-1-anant.thazhema...@gmail.com/ Anant Thazhemadam (12): usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API usb: misc: cypress_cy7c63: update to use usb_control

[PATCH v3 01/12] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}(), and all return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/appledisplay.c | 46 ++--- 1 file changed, 19 insertions(+), 27 deletions

[PATCH v3 02/12] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()

2021-01-26 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cypress_cy7c63.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index

Re: [PATCH v2 05/15] usb: misc: emi26: update to use usb_control_msg_send()

2021-01-07 Thread Anant Thazhemadam
On 04/12/20 8:11 pm, Johan Hovold wrote: > On Mon, Nov 30, 2020 at 06:58:47AM +0530, Anant Thazhemadam wrote: >> The newer usb_control_msg_{send|recv}() API are an improvement on the >> existing usb_control_msg() as it ensures that a short read/write is treated >> as an

Re: [PATCH v2 08/15] usb: misc: idmouse: update to use usb_control_msg_send()

2021-01-07 Thread Anant Thazhemadam
On 04/12/20 8:16 pm, Johan Hovold wrote: > On Mon, Nov 30, 2020 at 07:00:31AM +0530, Anant Thazhemadam wrote: >> The newer usb_control_msg_{send|recv}() API are an improvement on the >> existing usb_control_msg() as it ensures that a short read/write is treated >> as an er

Re: [f2fs-dev] [PATCH] fs: f2fs: fix potential shift-out-of-bounds error in sanity_check_raw_super()

2020-12-09 Thread Anant Thazhemadam
On 10/12/20 7:40 am, Chao Yu wrote: > On 2020/12/10 10:00, Anant Thazhemadam wrote: >> >> On 10/12/20 7:16 am, Chao Yu wrote: >>> Hi Anant, >>> >>> I've posted a patch a little earlier. :P >>> >>> https://lore.kernel.org/linux-f2fs-de

Re: [f2fs-dev] [PATCH] fs: f2fs: fix potential shift-out-of-bounds error in sanity_check_raw_super()

2020-12-09 Thread Anant Thazhemadam
On 10/12/20 7:16 am, Chao Yu wrote: > Hi Anant, > > I've posted a patch a little earlier. :P > > https://lore.kernel.org/linux-f2fs-devel/20201209084936.31711-1-yuch...@huawei.com/T/#u > Ah well, that's alright, especially considering that your patch looks better. Glad that bug has been fixed

[PATCH] fs: f2fs: fix potential shift-out-of-bounds error in sanity_check_raw_super()

2020-12-09 Thread Anant Thazhemadam
st be = 4096 for a valid block size, le32_to_cpu(raw_super->log_blocksize) must equal 12. Replacing the existing check with the more direct sanity check resolves this bug. Reported-by: syzbot+ca9a785f8ac472085...@syzkaller.appspotmail.com Tested-by: syzbot+ca9a785f8ac472085...@syzkaller.appspotma

Re: [PATCH] fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode()

2020-12-09 Thread Anant Thazhemadam
On 09/12/20 2:37 pm, Jan Kara wrote: > On Wed 09-12-20 01:13:38, Anant Thazhemadam wrote: >> When dquot_resume() was last updated, the argument that got passed >> to vfs_cleanup_quota_inode was incorrectly set. >> >> If type = -1 and dquot_load_quota_sb

[PATCH] fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode()

2020-12-08 Thread Anant Thazhemadam
-of-bounds bug. Fix this issue by correctly passing the arguments. Fixes: ae45f07d47cc ("quota: Simplify dquot_resume()") Reported-by: syzbot+2643e825238d7aabb...@syzkaller.appspotmail.com Tested-by: syzbot+2643e825238d7aabb...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- If

[PATCH] media: usb: dvd-usb: fix uninit-value bug in dibusb_read_eeprom_byte()

2020-12-06 Thread Anant Thazhemadam
...@syzkaller.appspotmail.com Tested-by: syzbot+e27b4fd589762b0b9...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- drivers/media/usb/dvb-usb/dibusb-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media

[PATCH] net: wireless: validate key indexes for cfg80211_registered_device

2020-12-04 Thread Anant Thazhemadam
in 2 places - nl80211_del_key(), and cfg80211_validate_key_settings(). Reported-by: syzbot+49d4cab497c2142ee...@syzkaller.appspotmail.com Tested-by: syzbot+49d4cab497c2142ee...@syzkaller.appspotmail.com Suggested-by: Johannes Berg Signed-off-by: Anant Thazhemadam --- For the bug that was getting

Re: [PATCH] net: mac80211: cfg: enforce sanity checks for key_index in ieee80211_del_key()

2020-12-01 Thread Anant Thazhemadam
On 01/12/20 5:36 pm, Johannes Berg wrote: > On Tue, 2020-12-01 at 17:26 +0530, Anant Thazhemadam wrote: >> On 01/12/20 3:30 pm, Johannes Berg wrote: >>> On Tue, 2020-12-01 at 15:26 +0530, Anant Thazhemadam wrote: >>>> Currently, it is assumed that

Re: [PATCH] net: mac80211: cfg: enforce sanity checks for key_index in ieee80211_del_key()

2020-12-01 Thread Anant Thazhemadam
On 01/12/20 3:30 pm, Johannes Berg wrote: > On Tue, 2020-12-01 at 15:26 +0530, Anant Thazhemadam wrote: >> Currently, it is assumed that key_idx values that are passed to >> ieee80211_del_key() are all valid indexes as is, and no sanity checks >> are performed for it. >&g

[PATCH] net: mac80211: cfg: enforce sanity checks for key_index in ieee80211_del_key()

2020-12-01 Thread Anant Thazhemadam
-off-by: Anant Thazhemadam --- net/mac80211/cfg.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7276e66ae435..d349e33134e6 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -516,12 +516,30

[PATCH v2 15/15] usb: misc: usbtest: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbtest.c | 69 -- 1 file changed, 29 insertions(+), 40 deletions

[PATCH v2 14/15] usb: misc: usbsevseg: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbsevseg.c | 60 ++-- 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc

[PATCH v2 13/15] usb: misc: trancevibrator: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() and the return value checking condition has also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/trancevibrator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc

[PATCH v2 11/15] usb: misc: ldusb: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg_send() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ldusb.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 670e4d91e9ca..259ead4edecb

[PATCH v2 12/15] usb: misc: lvstest: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/lvstest.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions

[PATCH v2 10/15] usb: misc: isight_firmware: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send(), and return value checking has also been appropriately enforced. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/isight_firmware.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git

[PATCH v2 09/15] usb: misc: iowarrior: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/iowarrior.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc

[PATCH v2 08/15] usb: misc: idmouse: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/idmouse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index e9437a176518..52126441a633

[PATCH v2 07/15] usb: misc: ezusb: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ezusb.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/usb/misc/ezusb.c b/drivers/usb/misc/ezusb.c index f058d8029761

[PATCH v2 06/15] usb: misc: emi62: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/emi62.c | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c index

[PATCH v2 05/15] usb: misc: emi26: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/emi26.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c index

[PATCH v2 04/15] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ehset.c | 76 +--- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/drivers/usb/misc/ehset.c b/drivers/usb/misc

[PATCH v2 03/15] usb: misc: cytherm: update to use usb_control_msg_recv()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). The return value checking enforced by callers of the updated function have also been appropriately updated. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cytherm.c | 128 + 1 file changed, 43

[PATCH v2 02/15] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cypress_cy7c63.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index

[PATCH v2 01/15] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}(), and all return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/appledisplay.c | 46 ++--- 1 file changed, 19 insertions(+), 27 deletions

[PATCH v2 00/15] drivers: usb: misc: update to use usb_control_msg_{send|recv}()

2020-11-29 Thread Anant Thazhemadam
logically incorrect, a patch with a fix can be sent in as well. Changes in v2: * Buffer variables that were previously dynamically allocated are no longer dynamically allocated unless they have a variable length (since that threw a warning). Anant Thazhemadam (15): usb: misc:

Re: [PATCH 03/15] usb: misc: cytherm: update to use usb_control_msg_recv()

2020-11-29 Thread Anant Thazhemadam
On 29/11/20 9:46 pm, Greg Kroah-Hartman wrote: > There's no more need to dynamically allocate the buffer variable here > now, right? It can be on the stack as the change you made above allows > that to work properly, no need to allocate the buffer twice in a row > (once here and once in the USB

[PATCH 11/15] usb: misc: ldusb: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg_send() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ldusb.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 670e4d91e9ca..259ead4edecb

[PATCH 13/15] usb: misc: trancevibrator: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() and the return value checking condition has also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/trancevibrator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc

[PATCH 08/15] usb: misc: idmouse: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/idmouse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index e9437a176518..52126441a633

[PATCH 10/15] usb: misc: isight_firmware: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send(), and return value checking has also been appropriately enforced. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/isight_firmware.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb

[PATCH 12/15] usb: misc: lvstest: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/lvstest.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff

[PATCH 15/15] usb: misc: usbtest: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() and the return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbtest.c | 63 +++--- 1 file changed, 31 insertions(+), 32 deletions

[PATCH 14/15] usb: misc: usbsevseg: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/usbsevseg.c | 52 +++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc

[PATCH 09/15] usb: misc: iowarrior: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/iowarrior.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc

[PATCH 07/15] usb: misc: ezusb: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ezusb.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/usb/misc/ezusb.c b/drivers/usb/misc/ezusb.c index f058d8029761

[PATCH 02/15] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cypress_cy7c63.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 14faec51d7a5

[PATCH 05/15] usb: misc: emi26: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/emi26.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c index 24d841850e05

[PATCH 04/15] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/ehset.c | 70 ++-- 1 file changed, 31 insertions(+), 39 deletions(-) diff --git a/drivers/usb/misc/ehset.c b/drivers/usb/misc

[PATCH 06/15] usb: misc: emi62: update to use usb_control_msg_send()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/emi62.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c index 3eea60437f56

[PATCH 03/15] usb: misc: cytherm: update to use usb_control_msg_recv()

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() has been replaced with usb_control_msg_recv(). The return value checking enforced by callers of the updated function have also been appropriately updated. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/cytherm.c | 42 +++--- 1 file changed, 21

[PATCH 01/15] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2020-11-29 Thread Anant Thazhemadam
of usb_control_msg() have been replaced with usb_control_msg_{recv|send}(), and all return value checking conditions have also been modified appropriately. Signed-off-by: Anant Thazhemadam --- drivers/usb/misc/appledisplay.c | 46 ++--- 1 file changed, 19 insertions(+), 27 deletions

[PATCH 00/15] drivers: usb: misc: update to use usb_control_msg_{send|recv}()

2020-11-29 Thread Anant Thazhemadam
logically incorrect, a patch with a fix can be sent in as well. Anant Thazhemadam (15): usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API usb: misc: cypress_cy7c63: update to use usb_control_msg_recv() usb: misc: cytherm: update to use usb_control_msg_recv() usb

[PATCH] misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells()

2020-11-22 Thread Anant Thazhemadam
-by: Anant Thazhemadam --- drivers/misc/vmw_vmci/vmci_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index 16695366ec92..26ff49fdf0f7 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b

Re: [RESEND PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-11-04 Thread Anant Thazhemadam
On 05/11/20 5:54 am, Jakub Kicinski wrote: > On Mon, 2 Nov 2020 23:09:46 +0530 Anant Thazhemadam wrote: >> Currently, __usbnet_{read|write}_cmd() use usb_control_msg(). >> However, this could lead to potential partial reads/writes being >> considered valid, and sinc

[PATCH 0/2] prevent potential access of uninitialized members in can_rcv() and canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
compromising the degree of detail provided in the log messages. Anant Thazhemadam (2): can: af_can: prevent potential access of uninitialized member in can_rcv() can: af_can: prevent potential access of uninitialized member in canfd_rcv() net/can/af_can.c | 38 -

[PATCH 1/2] can: af_can: prevent potential access of uninitialized member in can_rcv()

2020-11-03 Thread Anant Thazhemadam
ed-by: syzbot+9bcb0c9409066696d...@syzkaller.appspotmail.com Tested-by: Anant Thazhemadam Signed-off-by: Anant Thazhemadam --- net/can/af_can.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/net/can/af_can.c b/net/can/af_can.c index ea29a6d97ef5..8e

[PATCH 2/2] can: af_can: prevent potential access of uninitialized member in canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
once") Reported-by: syzbot+9bcb0c9409066696d...@syzkaller.appspotmail.com Tested-by: Anant Thazhemadam Signed-off-by: Anant Thazhemadam --- This patch was locally tested using the reproducer and .config file generated by syzbot. net/can/af_can.c | 19 ++- 1 file changed, 14 insertions

[RESEND PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-11-02 Thread Anant Thazhemadam
), and this can lead to issues. However, the new usb_control_msg_{send|recv}() APIs don't allow partial reads and writes. Using the new APIs also relaxes the return value checking that must be done after usbnet_{read|write}_cmd() is called. Signed-off-by: Anant Thazhemadam --- Changes in v3

Re: [PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-11-02 Thread Anant Thazhemadam
On 02/11/20 3:10 pm, Oliver Neukum wrote: > Am Sonntag, den 01.11.2020, 03:05 +0530 schrieb Anant Thazhemadam: >> Currently, __usbnet_{read|write}_cmd() use usb_control_msg(). >> However, this could lead to potential partial reads/writes being >> considered valid, and sinc

Re: [PATCH] net: can: prevent potential access of uninitialized value in canfd_rcv()

2020-11-01 Thread Anant Thazhemadam
On 02-11-2020 12:40, Marc Kleine-Budde wrote: > On 11/2/20 4:13 AM, Anant Thazhemadam wrote: >> In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this >> uninitialized cfd->len is accessed nonetheless by pr_warn_once(). >> >> Fix this uninitial

[PATCH] net: can: prevent potential access of uninitialized value in canfd_rcv()

2020-11-01 Thread Anant Thazhemadam
condition is checked, and appropriately modify the log messages that are generated as well. In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before. Reported-by: syzbot+9bcb0c9409066696d...@syzkaller.appspotmail.com Tested-by: Anant Thazhemadam

[PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-31 Thread Anant Thazhemadam
), and this can lead to issues. However, the new usb_control_msg_{send|recv}() APIs don't allow partial reads and writes. Using the new APIs also relaxes the return value checking that must be done after usbnet_{read|write}_cmd() is called. Signed-off-by: Anant Thazhemadam --- Changes in v3

Re: [PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-31 Thread Anant Thazhemadam
On 01/11/20 2:41 am, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 18:52:56 +0530 Anant Thazhemadam wrote: >> +return usb_control_msg_recv(dev->udev, 0, >> + cmd, reqtype, value, index, data, size, >> + USB_CTRL

Re: [PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-29 Thread Anant Thazhemadam
On 29/10/20 6:52 pm, Anant Thazhemadam wrote: > Currently, __usbnet_{read|write}_cmd() use usb_control_msg(), > and thus consider potential partial reads/writes being done to > be perfectly valid. > Quite a few callers of usbnet_{read|write}_cmd() don't enforce > checking fo

[PATCH v2] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-29 Thread Anant Thazhemadam
that a complete read/write occurs. However, the new usb_control_msg_{send|recv}() APIs don't allow partial reads and writes. Using the new APIs also relaxes the return value checking that must be done after usbnet_{read|write}_cmd() is called. Signed-off-by: Anant Thazhemadam --- Changes in v2

[tip: perf/urgent] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-19 Thread tip-bot2 for Anant Thazhemadam
The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 38df15cb4ce149ce3648d2a9ccc0140afa71fc02 Gitweb: https://git.kernel.org/tip/38df15cb4ce149ce3648d2a9ccc0140afa71fc02 Author:Anant Thazhemadam AuthorDate:Sat, 10 Oct 2020 13:59:32 +05:30

[PATCH v5] bluetooth: hci_h5: fix memory leak in h5_close

2020-10-16 Thread Anant Thazhemadam
ces") Reported-by: syzbot+6ce141c55b2f7aafd...@syzkaller.appspotmail.com Tested-by: syzbot+6ce141c55b2f7aafd...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- Changes in v5: * Set h5->rx_skb = NULL unconditionally - to improve code readability *

Re: [PATCH v4] bluetooth: hci_h5: fix memory leak in h5_close

2020-10-16 Thread Anant Thazhemadam
Hi, On 16/10/20 4:58 pm, Hans de Goede wrote: > Hi, > > On 10/7/20 5:48 AM, Anant Thazhemadam wrote: >> If h5_close is called when !hu->serdev, h5 is directly freed. >> However, h5->rx_skb is not freed, which causes a memory leak. >> >> Freeing h5->rx

[PATCH v2] fs: gfs2: add validation checks for size of superblock

2020-10-14 Thread Anant Thazhemadam
. Performing validation checks and ensuring that the size of the superblock is valid fixes this bug. Reported-by: syzbot+af90d47a37376844e...@syzkaller.appspotmail.com Tested-by: syzbot+af90d47a37376844e...@syzkaller.appspotmail.com Suggested-by: Andrew Price Signed-off-by: Anant Thazhemadam

Re: [Cluster-devel] [PATCH] fs: gfs2: prevent OOB access in gfs2_read_sb()

2020-10-14 Thread Anant Thazhemadam
On 14/10/20 6:34 pm, Andrew Price wrote: > On 13/10/2020 16:26, Anant Thazhemadam wrote: >> In gfs2_read_sb(), if the condition >> (d != sdp->sd_heightsize[x - 1] || m) >> isn't satisfied (in the first 11 iterations), the loop continues, >> and begins to perfor

Re: [Cluster-devel] KASAN: slab-out-of-bounds Write in gfs2_fill_super

2020-10-14 Thread Anant Thazhemadam
On 30/09/20 7:52 pm, Andrew Price wrote: > On 30/09/2020 13:39, syzbot wrote: >> Hello, >> >> syzbot found the following issue on: >> >> HEAD commit:    fb0155a0 Merge tag 'nfs-for-5.9-3' of git://git.linux-nfs... >> git tree:   upstream >> console output:

[PATCH] fs: gfs2: prevent OOB access in gfs2_read_sb()

2020-10-13 Thread Anant Thazhemadam
ment) that can be used. Reported-by: syzbot+a5e2482a693e6b1e4...@syzkaller.appspotmail.com Tested-by: syzbot+a5e2482a693e6b1e4...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- I have one question here (potentially a place where I suspect this patch could have a fatal flaw and

Re: [PATCH net] net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid

2020-10-12 Thread Anant Thazhemadam
On 12-10-2020 13:29, Dominique Martinet wrote: > Anant Thazhemadam wrote on Mon, Oct 12, 2020: >> In p9_fd_create_unix, checking is performed to see if the addr (passed >> as an argument) is NULL or not. >> However, no check is performed to see if addr is a valid address

[PATCH net] net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid

2020-10-11 Thread Anant Thazhemadam
Signed-off-by: Anant Thazhemadam --- net/9p/trans_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index c0762a302162..8f528e783a6c 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -1023,7 +1023,7 @@ p9_fd_create_unix(struct

[PATCH v2] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-11 Thread Anant Thazhemadam
or not fixes this problem, and copies the ethernet address appropriately. Fixes: f45a4248ea4c ("net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails") Signed-off-by: Anant Thazhemadam --- Changes in v2: * Fixed the format of the Fixes tag * Modified the comm

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
Hi, On 10/10/20 10:29 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: >> get_registers() directly returns the return value of >> usb_control_msg_recv() - 0 if successful, and negative error number >> otherwise. > Are yo

Re: [PATCH] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-10 Thread Anant Thazhemadam
On 10/10/20 10:33 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 12:26:23 +0530 Anant Thazhemadam wrote: >> GPF_KERNEL > You haven't even built this, let alone tested :/ I'm really sorry about this. Turns out, my .config wasn't set generated by make allyesconfig, and thus this reg

Re: [PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
On 10/10/20 11:46 pm, Jakub Kicinski wrote: > On Sat, 10 Oct 2020 23:34:51 +0530 Anant Thazhemadam wrote: >> On 10/10/20 10:29 pm, Jakub Kicinski wrote: >>> On Sat, 10 Oct 2020 12:14:59 +0530 Anant Thazhemadam wrote: >>>> get_registers() dir

[PATCH v3] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-10 Thread Anant Thazhemadam
to be invalid. Reported-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Tested-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- Changes in v3: * Correctly list version information Changes in v2: * Fix coding style issue

Re: [PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-10 Thread Anant Thazhemadam
On 10/10/20 1:39 pm, Greg Kroah-Hartman wrote: > On Sat, Oct 10, 2020 at 07:29:13AM +0530, Anant Thazhemadam wrote: >> Hi, >> >> On 10-10-2020 12:30, Greg Kroah-Hartman wrote: >>> On Fri, Oct 09, 2020 at 09:50:29PM +0530, Anant Thazhemadam wrote: &g

Re: [PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-10 Thread Anant Thazhemadam
Hi, On 10-10-2020 12:30, Greg Kroah-Hartman wrote: > On Fri, Oct 09, 2020 at 09:50:29PM +0530, Anant Thazhemadam wrote: >> While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if >> wMaxPacketSize = 0 for the endpoints found. >> >> Some devices have isoc

[PATCH] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-10-10 Thread Anant Thazhemadam
), and this can lead to issues. However, the new usb_control_msg_{send|recv}() APIs don't allow partial reads and writes. Using the new APIs also relaxes the return value checking that must be done after usbnet_{read|write}_cmd() is called. Signed-off-by: Anant Thazhemadam --- Since not all

[PATCH] net: usb: rtl8150: don't incorrectly assign random MAC addresses

2020-10-10 Thread Anant Thazhemadam
m MAC address when set_ethernet_addr() fails") Signed-off-by: Anant Thazhemadam --- drivers/net/usb/rtl8150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index f020401adf04..bf8a60533f3e 100644 --- a/drivers/net/usb

Re: [PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
On 09/10/20 9:46 pm, Anant Thazhemadam wrote: > While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if > wMaxPacketSize = 0 for the endpoints found. > > Some devices have isochronous endpoints that have wMaxPacketSize = 0 > (as required by the USB-2 spec). &

[PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
to be invalid. Reported-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Tested-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- The error (as detected by syzbot) is generated in vmk80xx_write_packet() (which is called in vmk80xx_reset_device

[PATCH] staging: comedi: check validity of wMaxPacketSize of usb endpoints found

2020-10-09 Thread Anant Thazhemadam
to be invalid. Reported-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Tested-by: syzbot+009f546aa1370056b...@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam --- The error (as detected by syzbot) is generated in vmk80xx_write_packet() (which is called in vmk80xx_reset_device

  1   2   >