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] [day] [month] [year] [list]
Message-ID: <tip-bfdb4d9f0f611687d71cf6a460efc9e755f4a462@git.kernel.org>
Date:	Tue, 23 Jun 2009 08:51:47 GMT
From:	tip-bot for Arun R Bharadwaj <arun@...ux.vnet.ibm.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	arun@...ux.vnet.ibm.com, tglx@...utronix.de, mingo@...e.hu,
	mpnayak@...ux.vnet.ibm.com
Subject: [tip:timers/urgent] timers: Fix timer_migration interface which accepts any number as input

Commit-ID:  bfdb4d9f0f611687d71cf6a460efc9e755f4a462
Gitweb:     http://git.kernel.org/tip/bfdb4d9f0f611687d71cf6a460efc9e755f4a462
Author:     Arun R Bharadwaj <arun@...ux.vnet.ibm.com>
AuthorDate: Tue, 23 Jun 2009 10:00:58 +0530
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 23 Jun 2009 10:49:33 +0200

timers: Fix timer_migration interface which accepts any number as input

Poornima Nayek reported:

| Timer migration interface /proc/sys/kernel/timer_migration in
| 2.6.30-git9 accepts any numerical value as input.
|
| Steps to reproduce:
| 1. echo -6666666 > /proc/sys/kernel/timer_migration
| 2. cat /proc/sys/kernel/timer_migration
| -6666666
|
| 1. echo 44444444444444444444444444444444444444444444444444444444444 > /proc/sys/kernel/timer_migration
| 2. cat /proc/sys/kernel/timer_migration
| -1357789412
|
| Expected behavior: Should 'echo: write error: Invalid argument' while
| setting any value other then 0 & 1

Restrict valid values to 0 and 1.

Reported-by: Poornima Nayak <mpnayak@...ux.vnet.ibm.com>
Tested-by: Poornima Nayak <mpnayak@...ux.vnet.ibm.com>
Signed-off-by: Arun R Bharadwaj <arun@...ux.vnet.ibm.com>
Cc: poornima nayak <mpnayak@...ux.vnet.ibm.com>
Cc: Arun Bharadwaj <arun@...ux.vnet.ibm.com>
LKML-Reference: <20090623043058.GA3249@...ux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 kernel/sysctl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 62e4ff9..c428ba1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -335,7 +335,10 @@ static struct ctl_table kern_table[] = {
 		.data		= &sysctl_timer_migration,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec,
+		.proc_handler	= &proc_dointvec_minmax,
+		.strategy	= &sysctl_intvec,
+		.extra1		= &zero,
+		.extra2		= &one,
 	},
 #endif
 	{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ