INN commit: branches/2.5 (doc/pod/news.pod nnrpd/post.c)

INN Commit rra at isc.org
Mon Feb 17 13:13:43 UTC 2014


    Date: Monday, February 17, 2014 @ 05:13:43
  Author: iulius
Revision: 9601

nnrpd:  fixed an overlapping copy

Fixed an issue where users were denied posting because of an overlapping
buffer copy in a check nnrpd was doing.  

The error seen was "address not in Internet syntax" while using a From:
address of the form <a at test1.de>.  Debugging revealed that nnrpd copies
a buffer into itself to look at the part behind the "@", and for very
specific inputs on an old version of nnrpd that still uses strcpy, the
result did not contain the dot separating the top-level domain any more.

Thanks to Florian Schlichting for the patch.

Modified:
  branches/2.5/doc/pod/news.pod
  branches/2.5/nnrpd/post.c

------------------+
 doc/pod/news.pod |    6 ++++++
 nnrpd/post.c     |    3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2014-02-17 13:10:24 UTC (rev 9600)
+++ doc/pod/news.pod	2014-02-17 13:13:43 UTC (rev 9601)
@@ -49,6 +49,12 @@
 
 =item *
 
+Fixed an issue where users were denied posting because of an overlapping
+buffer copy in a check B<nnrpd> was doing.  Thanks to Florian Schlichting
+for the patch.
+
+=item *
+
 Fixed a regression that occurred in S<INN 2.5.3> regarding the path used
 by default by B<pullnews> for its configuration file.  Instead of looking
 in the running user's home directory, it was looking in the I<pathnews>

Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c	2014-02-17 13:10:24 UTC (rev 9600)
+++ nnrpd/post.c	2014-02-17 13:13:43 UTC (rev 9601)
@@ -1090,8 +1090,7 @@
     HeaderCleanFrom(frombuf);
     p = strchr(frombuf, '@');
     if (p) {
-	strlcpy(frombuf, p+1, sizeof(frombuf));
-	p = strrchr(frombuf, '.');
+	p = strrchr(p+1, '.');
 	if (!p) {
 	    if (modgroup)
 		free(modgroup);



More information about the inn-committers mailing list