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:	Sun, 19 May 2013 15:11:12 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	gang.chen@...anux.com
Cc:	samuel@...tiz.org, netdev@...r.kernel.org
Subject: Re: [PATCH] net: irda: using kzalloc() instead of kmalloc() to
 avoid strncpy() issue.

From: Chen Gang <gang.chen@...anux.com>
Date: Fri, 17 May 2013 17:13:04 +0800

> 
> 'discovery->data.info' length is 22, NICKNAME_MAX_LEN is 21, so the
> strncpy() will always left the last byte of 'discovery->data.info'
> uninitialized.
> 
> When 'text' length is longer than 21 (NICKNAME_MAX_LEN), if still left
> the last byte of 'discovery->data.info' uninitialized, the next
> strlen() will cause issue.
> 
> Also 'discovery->data' is 'struct irda_device_info' which defined in
> "include/uapi/...", it may copy to user mode, so need whole initialized.
> 
> All together, need use kzalloc() instead of kmalloc() to initialize all
> members firstly.
> 
> Signed-off-by: Chen Gang <gang.chen@...anux.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ