lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Nov 2020 08:52:21 +0100
From:   Pavel Machek <pavel@....cz>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Jason Gerecke <jason.gerecke@...om.com>,
        Ping Cheng <ping.cheng@...om.com>,
        Jiri Kosina <jkosina@...e.cz>
Subject: Re: [PATCH 4.19 146/191] HID: wacom: Avoid entering
 wacom_wac_pen_report for pad / battery

Hi!

> To correct this, we restore a version of the `WACOM_PAD_FIELD` check
> in `wacom_wac_collection()` and return early. This effectively prevents
> pad / battery collections from being reported until the very end of the
> report as originally intended.

Okay... but code is either wrong or very confusing:

> +++ b/drivers/hid/wacom_wac.c
> @@ -2729,7 +2729,9 @@ static int wacom_wac_collection(struct h
>  	if (report->type != HID_INPUT_REPORT)
>  		return -1;
>  
> -	if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
> +	if (WACOM_PAD_FIELD(field))
> +		return 0;
> +	else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
>  		wacom_wac_pen_report(hdev, report);

wacom_wac_pen_report() can never be called, because WACOM_PEN_FIELD()
can not be true here; if it was we'd return in the line above.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ