mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 1/2] inux-2.6.9/fs/proc/base.c: array size
@ 2004-12-25 15:35 domen
  0 siblings, 0 replies; 2+ messages in thread
From: domen @ 2004-12-25 15:35 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, domen, wharms

[Sorry about duplicate, had mail problems]

Hi list,
i was looking for arrays (and possible overflows) when i noticed that
proc_pid_wchan() uses a 128-Byte array for something that can change its size
via define.

Fix possible overflow: rewrite arraysize with correct constant

re,
walter

signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/fs/proc/base.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/proc/base.c~array_size-fs_proc_base.c.bak fs/proc/base.c
--- kj/fs/proc/base.c~array_size-fs_proc_base.c.bak	2004-12-25 01:36:07.000000000 +0100
+++ kj-domen/fs/proc/base.c	2004-12-25 01:36:07.000000000 +0100
@@ -401,7 +401,7 @@ static int proc_pid_wchan(struct task_st
 	char *modname;
 	const char *sym_name;
 	unsigned long wchan, size, offset;
-	char namebuf[128];
+	char namebuf[KSYM_NAME_LEN+1];
 
 	wchan = get_wchan(task);
 
diff -L fs/proc/base.c.bak -puN /dev/null /dev/null
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [patch 1/2] inux-2.6.9/fs/proc/base.c: array size
@ 2004-12-25 14:26 domen
  0 siblings, 0 replies; 2+ messages in thread
From: domen @ 2004-12-25 14:26 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, domen, wharms


Hi list,
i was looking for arrays (and possible overflows) when i noticed that
proc_pid_wchan() uses a 128-Byte array for something that can change its size
via define.

Fix possible overflow: rewrite arraysize with correct constant

re,
walter

signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/fs/proc/base.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/proc/base.c~array_size-fs_proc_base.c.bak fs/proc/base.c
--- kj/fs/proc/base.c~array_size-fs_proc_base.c.bak	2004-12-25 01:36:07.000000000 +0100
+++ kj-domen/fs/proc/base.c	2004-12-25 01:36:07.000000000 +0100
@@ -401,7 +401,7 @@ static int proc_pid_wchan(struct task_st
 	char *modname;
 	const char *sym_name;
 	unsigned long wchan, size, offset;
-	char namebuf[128];
+	char namebuf[KSYM_NAME_LEN+1];
 
 	wchan = get_wchan(task);
 
diff -L fs/proc/base.c.bak -puN /dev/null /dev/null
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-25 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-25 15:35 [patch 1/2] inux-2.6.9/fs/proc/base.c: array size domen
  -- strict thread matches above, loose matches on Subject: below --
2004-12-25 14:26 domen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome