+ net-sunrpc-svcsockc-dont-print-uninitialised-string.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     net/sunrpc/svcsock.c: don't print uninitialised string
has been added to the -mm tree.  Its filename is
     net-sunrpc-svcsockc-dont-print-uninitialised-string.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: net/sunrpc/svcsock.c: don't print uninitialised string
From: Wolfgang Walter <wolfgang.walter@xxxxxxxxxxxxxxxxxxxx>

Random characters are printed by svc_tcp_accept:

	lockd: last TCP connect from <some random chars>

because buf is used unitialized:

printk(KERN_NOTICE
	"%s: last TCP connect from %s\n",
	serv->sv_name, buf);

Probably it should be

printk(KERN_NOTICE
	"%s: last TCP connect from %s\n",
	serv->sv_name, __svc_print_addr(sin, buf, sizeof(buf)));

Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Cc: "J. Bruce Fields" <bfields@xxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 net/sunrpc/svcsock.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN net/sunrpc/svcsock.c~net-sunrpc-svcsockc-dont-print-uninitialised-string net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c~net-sunrpc-svcsockc-dont-print-uninitialised-string
+++ a/net/sunrpc/svcsock.c
@@ -1111,7 +1111,8 @@ svc_tcp_accept(struct svc_sock *svsk)
 						   serv->sv_name);
 				printk(KERN_NOTICE
 				       "%s: last TCP connect from %s\n",
-				       serv->sv_name, buf);
+				       serv->sv_name,
+				       __svc_print_addr(sin, buf, sizeof(buf)));
 			}
 			/*
 			 * Always select the oldest socket. It's not fair,
_

Patches currently in -mm which might be from wolfgang.walter@xxxxxxxxxxxxxxxxxxxx are

net-sunrpc-svcsockc-dont-print-uninitialised-string.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux