SEGV when logging IORs with %n on Linux (Sourceforge OmniEvents ID: 3088032)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
omnievents (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: omnievents
Hello,
I've send this bug report already to the sourceforge site of omnievents, though it seems that nobody is mainting this anymore.
Please let me know if I should post this bug report somewhere else, and thanks in advance.
===
When logging unreachable proxies possible printf directives in the string are not escaped.
We've tested this running version 2.6.2 on a Ubuntu 8.04 machine
[New process 25288]
#0 0xb785d64d in vfprintf () from /lib/tls/
(gdb) bt
#0 0xb785d64d in vfprintf () from /lib/tls/
#1 0xb78ef4e6 in __vsyslog_chk () from /lib/tls/
#2 0xb78ef6da in syslog () from /lib/tls/
#3 0x0804ec8d in OmniEvents:
message=0x807847c "Object failure: IDL:omg.
#4 0xb7db90d2 in omniORB:
#5 0xb7f18e30 in OmniEvents:
ex=0x80695a8) at Orb.cc:248
#6 0xb7f2c3ca in OmniEvents:
at ProxyPushSuppli
#7 0xb7f2a6f9 in OmniEvents:
#8 0xb7aaac4d in omni_thread_wrapper () from /usr/lib/
#9 0xb79714fb in start_thread () from /lib/tls/
#10 0xb78f2e5e in clone () from /lib/tls/
=======
A catior of a this IOR shows the ID with printf directives:
Type ID: "IDL:omg.
Profiles:
1. IIOP 1.2 ibi-yog1 43568 "....L..%n....."
TAG_ORB_TYPE omniORB
TAG_CODE_SETS char native code set: ISO-8859-1
char conversion code set: UTF-8
wchar native code set: UTF-16
wchar conversion code set: UTF-16
=======
The proposed patch is to write messages to syslog using the %s printf directive and passing the message as a printf arg:
--- daemon_unix.cc_old 2010-10-15 12:40:56.000000000 +0200
+++ daemon_unix.cc 2010-10-15 11:54:13.000000000 +0200
@@ -285,7 +285,7 @@
}
}
// Send the message.
- ::syslog(
+ ::syslog(
#ifndef LOG_PERROR
// If we don't have LOG_PERROR, then we'll have to manually send
// log messages to stderr.
=======
We've tested it and now these messages are logged correctly.
Fixed in Debian revision 1:2.6.2-3 of omnievents
Regards,
Guilherme Xavier