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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZWzHv7X1UKgJJYTy@google.com>
Date:   Sun, 3 Dec 2023 18:35:00 +0000
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Zoltán Böszörményi <zboszor@...il.com>
Cc:     linux-kernel@...r.kernel.org, oe-kbuild-all@...ts.linux.dev,
        zboszormenyi@...om.com, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] egalax_ts_serial: Fix potential buffer overflow

Hi Zoltán,

On Sun, Dec 03, 2023 at 10:06:00AM +0100, Zoltán Böszörményi wrote:
> @@ -42,7 +42,7 @@ struct egalax {
>  	struct serio *serio;
>  	int idx;
>  	u8 data[EGALAX_FORMAT_MAX_LENGTH];
> -	char phys[32];
> +	char phys[NAME_MAX];

This simply wastes 200+ bytes for no good reason. It is perfectly fine
to truncate phys string (which does not happen in practice).

If you feel strongly about it then maybe use devm_kasprintf() to
allocate the needed buffer.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ