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]
Message-ID: <20130918094817.18754.8847.stgit@zurg>
Date:	Wed, 18 Sep 2013 13:48:17 +0400
From:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
To:	linux-kernel@...r.kernel.org
Cc:	Richard Guy Briggs <rgb@...hat.com>,
	Eric Paris <eparis@...hat.com>,
	Luiz Capitulino <lcapitulino@...hat.com>,
	Dan Duval <dan.duval@...cle.com>,
	Dave Kleikamp <dave.kleikamp@...cle.com>,
	Chuck Anderson <chuck.anderson@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] audit: fix endless wait in audit_log_start()

After commit 829199197a430dade2519d54f5545c4a094393b8 audit emiters will block
forever if userspace daemon cannot handle backlog. After the timeout waiting
loop turns into busy loop and runs until daemon dies or returns back to work.
This is minimal patch for that bug.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Luiz Capitulino <lcapitulino@...hat.com>
Cc: Richard Guy Briggs <rgb@...hat.com>
Cc: Eric Paris <eparis@...hat.com>
Cc: Chuck Anderson <chuck.anderson@...cle.com>
Cc: Dan Duval <dan.duval@...cle.com>
Cc: Dave Kleikamp <dave.kleikamp@...cle.com>
---
 kernel/audit.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 91e53d0..7b0e23a 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1117,9 +1117,10 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
 
 			sleep_time = timeout_start + audit_backlog_wait_time -
 					jiffies;
-			if ((long)sleep_time > 0)
+			if ((long)sleep_time > 0) {
 				wait_for_auditd(sleep_time);
-			continue;
+				continue;
+			}
 		}
 		if (audit_rate_check() && printk_ratelimit())
 			printk(KERN_WARNING

--
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