From: "Troels Walsted Hansen" <troels@thule.no>
To: linux-kernel@vger.kernel.org, greg@wind.enjellic.com, joey@linux.de
Subject: [PATCH] klogd busy loop on zero byte (output from 3c59x driver)
Date: Thu, 11 Jan 2001 09:48:57 +0100 [thread overview]
Message-ID: <CKECLHEEHJOPHGPCOCKPEECCCCAA.troels@thule.no> (raw)
Hi all.
I found a bug in the sysklogd package version 1.4. When it encounters a zero
byte in the kernel logging output, the text parser enters a busy loop. I
came upon it when the 3c59x driver from kernel 2.4.0 started outputting two
zero bytes for the product code of my laptop's 3Com card. It could be argued
that the kernel should never output zero bytes in the logging info, but
obviously that will happen from time to time.
I fear this bug might be considered a security issue as well, if the kernel
can be coerced to output a zero byte somehow, all kernel logging will stop.
I have included a patch to klogd.c to correct the issue.
--- sysklogd-1.4.orig/klogd.c Mon Sep 18 09:34:11 2000
+++ sysklogd-1.4/klogd.c Thu Jan 11 09:26:10 2001
@@ -739,6 +758,13 @@
break; /* full line_buff or end of input buffer */
}
+ if( *ptr == '\0' ) /* zero byte */
+ {
+ ptr++; /* skip zero byte */
+ space -= 1;
+ len -= 1;
+ break;
+ }
if( *ptr == '\n' ) /* newline */
{
ptr++; /* skip newline */
--
Troels Walsted Hansen
troels@thule.no
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2001-01-11 8:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-11 8:48 Troels Walsted Hansen [this message]
2001-01-11 11:41 ` [PATCH] klogd busy loop on zero byte (output from 3c59x driver) Manfred
2001-01-11 12:03 ` Andrew Morton
2001-01-11 14:06 ` Troels Walsted Hansen
2001-01-11 17:30 ` David Hinds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CKECLHEEHJOPHGPCOCKPEECCCCAA.troels@thule.no \
--to=troels@thule.no \
--cc=greg@wind.enjellic.com \
--cc=joey@linux.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox