summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-10 11:23:45 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-10 11:23:45 +0200
commitcf7ae32214eefe6e60267dc68cadf17122173f1d (patch)
tree4bcc28c4002149981a879df8f46d1fb73effd30f
parentf7ad5aeff03833879957ef00136610d1138a7212 (diff)
parent1d856763f9a3f078af7f066867ae88c59286285c (diff)
downloadrsyslog-cf7ae32214eefe6e60267dc68cadf17122173f1d.tar.gz
rsyslog-cf7ae32214eefe6e60267dc68cadf17122173f1d.tar.xz
rsyslog-cf7ae32214eefe6e60267dc68cadf17122173f1d.zip
Merge branch 'v5-stable' into v5-devel
-rw-r--r--ChangeLog9
-rw-r--r--runtime/msg.c13
-rw-r--r--runtime/net.c2
3 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 173cc63f..febe6c0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,12 @@ Version 5.9.0 [V5-DEVEL] (rgerhards), 2011-06-08
---------------------------------------------------------------------------
Version 5.8.4 [V5-stable] (al), 2011-??-??
- bugfix: potential misadressing in property replacer
+- bugfix: memcpy overflow can occur in allowed sender checkig
+ if a name is resolved to IPv4-mapped-on-IPv6 address
+ Found by Ismail Dönmez at suse
+- bugfix: potential misadressing in property replacer
+- bugfix: MSGID corruption in RFC5424 parser under some circumstances
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=275
---------------------------------------------------------------------------
Version 5.8.3 [V5-stable] (rgerhards), 2011-07-11
- systemd support: set stdout/stderr to null - thx to Lennart for the patch
@@ -935,6 +941,9 @@ Version 4.7.0 [v4-devel] (rgerhards), 2010-04-14
---------------------------------------------------------------------------
Version 4.6.8 [v4-stable] (rgerhards), 2011-??-??
- bugfix: potential misadressing in property replacer
+- bugfix: memcpy overflow can occur in allowed sender checkig
+ if a name is resolved to IPv4-mapped-on-IPv6 address
+ Found by Ismail Dönmez at suse
---------------------------------------------------------------------------
Version 4.6.7 [v4-stable] (rgerhards), 2011-07-11
- added support for the ":omusrmsg:" syntax in configuring user messages
diff --git a/runtime/msg.c b/runtime/msg.c
index 8c8e9670..cc7b463d 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1629,14 +1629,21 @@ finalize_it:
}
-/* rgerhards, 2005-11-24
+/* al, 2011-07-26: LockMsg to avoid race conditions
*/
static inline char *getMSGID(msg_t *pM)
{
- return (pM->pCSMSGID == NULL) ? "-" : (char*) rsCStrGetSzStrNoNULL(pM->pCSMSGID);
+ if (pM->pCSMSGID == NULL) {
+ return "-";
+ }
+ else {
+ MsgLock(pM);
+ char* pszreturn = (char*) rsCStrGetSzStrNoNULL(pM->pCSMSGID);
+ MsgUnlock(pM);
+ return pszreturn;
+ }
}
-
/* rgerhards 2009-06-12: set associated ruleset
*/
void MsgSetRuleset(msg_t *pMsg, ruleset_t *pRuleset)
diff --git a/runtime/net.c b/runtime/net.c
index 789790f6..4781739f 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -722,7 +722,7 @@ static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedS
SIN(allowIP.addr.NetAddr)->sin_port = 0;
memcpy(&(SIN(allowIP.addr.NetAddr)->sin_addr.s_addr),
&(SIN6(res->ai_addr)->sin6_addr.s6_addr32[3]),
- sizeof (struct sockaddr_in));
+ sizeof (in_addr_t));
if((iRet = AddAllowedSenderEntry(ppRoot, ppLast, &allowIP,
iSignificantBits))