* [PATCH] Don't free() static data in libauparse
@ 2008-06-02 14:29 Miloslav Trmač
2008-06-02 15:42 ` Steve Grubb
0 siblings, 1 reply; 2+ messages in thread
From: Miloslav Trmač @ 2008-06-02 14:29 UTC (permalink / raw)
To: linux-audit
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
Hello,
The "interpretation" code in libuparse stores literal strings as
interpreted data for the second operand of fcntl(). This causes a crash
in free() when freeing the record.
The attached patch fixes the crash.
Mirek
[-- Attachment #2: audit-1.7.4-fcntl.patch --]
[-- Type: text/x-patch, Size: 370 bytes --]
diff -urN audit/auparse/interpret.c audit-1.7.4/auparse/interpret.c
--- audit/auparse/interpret.c 2008-05-15 23:09:57.000000000 +0200
+++ audit-1.7.4/auparse/interpret.c 2008-06-02 16:04:38.000000000 +0200
@@ -732,7 +732,7 @@
s = fcntl_i2s(cmd);
if (s != NULL)
- return s;
+ return strdup(s);
asprintf(&out, "unknown fcntl command(%d)", cmd);
return out;
}
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-02 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-02 14:29 [PATCH] Don't free() static data in libauparse Miloslav Trmač
2008-06-02 15:42 ` Steve Grubb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox