Bug 227543 - [PATCH] mail/tpop3d: patch remote DoS (Bugtraq ID 39838, Savannah bug 33413)
Summary: [PATCH] mail/tpop3d: patch remote DoS (Bugtraq ID 39838, Savannah bug 33413)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kirill Ponomarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-16 07:24 UTC by Jeremy Chadwick
Modified: 2018-12-09 11:49 UTC (History)
1 user (show)

See Also:


Attachments
files/patch-remote-dos-fix-bugtraq-39838 (3.83 KB, patch)
2018-04-16 07:24 UTC, Jeremy Chadwick
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2018-04-16 18:26:16 UTC
I couldn't compile it on CURRENT:

--- buffer.o ---
buffer.c:155:5: error: called object type 'void *' is not a function or function pointer
    assert(a <= (size_t)INT_MAX);
    ^
/usr/include/assert.h:56:19: note: expanded from macro 'assert'
#define assert(e)       ((e) ? (void)0 : __assert(__func__, __FILE__, \
                        ^
1 error generated.                                                                                                           
*** [buffer.o] Error code 1                                                                                                  

--- connection.o ---                                                                                                         
connection.c:118:59: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
    if (getsockname(s, (struct sockaddr*)&(c->sin_local), &n) < 0) {
                                                          ^~
/usr/include/sys/socket.h:667:74: note: passing argument to parameter here                                                   
int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
Comment 2 Jeremy Chadwick 2018-04-16 18:35:29 UTC
This patch is not mine, it comes from official source.  See first link in comment #0.

This looks like another clang-version-specific catch.  I did not encounter it on stable/11 r332308.  I do not know how to fix this failure.

As for warnings: tpop3d during compile will spew a decent number of warnings and has for some time.  Maybe less with gcc; unsure.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-12-09 11:48:32 UTC
A commit references this bug:

Author: krion
Date: Sun Dec  9 11:48:24 UTC 2018
New revision: 487039
URL: https://svnweb.freebsd.org/changeset/ports/487039

Log:
  Add patches to avoid accessing unallocated memory.

  buffer_consume_to_mark() was trying to use Boyer-Moore search to
  find specified mark string but implementation was walking through
  unallocated memory.

  PR:		227543
  Submitted by:	Jeremy Chadwick <jdc@koitsu.org>

Changes:
  head/mail/tpop3d/Makefile