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:   Mon, 14 Nov 2016 14:36:28 -0800
From:   Rick Jones <rick.jones2@....com>
To:     dwilder <dwilder@...ibm.com>, mtk.manpages@...il.com
Cc:     linux-man@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [patch] netlink.7: srcfix Change buffer size in example code
 about reading netlink message.

> Lets change the example so others don't propagate the problem further.
>
> Signed-off-by David Wilder <dwilder@...ibm.com>
>
> --- man7/netlink.7.orig 2016-11-14 13:30:36.522101156 -0800
> +++ man7/netlink.7      2016-11-14 13:30:51.002086354 -0800
> @@ -511,7 +511,7 @@
>  .in +4n
>  .nf
>  int len;
> -char buf[4096];
> +char buf[8192];

Since there doesn't seem to be a define one could use in the user space 
linux/netlink.h (?), but there are comments in the example code in the 
manpage, how about also including a brief comment to the effect that 
using 8192 bytes will avoid message truncation problems on platforms 
with a large PAGE_SIZE?

/* avoid msg truncation on > 4096 byte PAGE_SIZE platforms */

or something like that.

rick jones

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ