atftpd crash - denial of service

Bug #309746 reported by Jakob Hilmer
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
atftp (Debian)
Fix Released
Undecided
Unassigned
atftp (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: atftpd

Description: Ubuntu 8.04.1
Release: 8.04
Architecture: i386
Source: atftp
Version: 0.7.dfsg-3

Atftpd crash with signal 11. I can force atftpd to crash during a tftp session by sending it a malformed tftp error packet. Client ask for a file - atftpd sent first block of data - client send a malformed tftp error packet only consisting of the error opcode and the errno - but without the required error string. Hereafter atftpd crash with signal 11.

Atftpd use a customized version of Strncpy there ensure the copied string is null terminated. The implementation did not take into account that the string size could be zero.

I have attached a patch which solve the problem. I have also a small perl script there create the malformed tftp session.

Regards,

Jakob Hilmer - <email address hidden>

Tags: bitesize

Related branches

Revision history for this message
Jakob Hilmer (jakob-hilmer) wrote :
Revision history for this message
Jakob Hilmer (jakob-hilmer) wrote :

Attached perl script there create the malformed tftp session.

Changed in atftp:
status: Unknown → New
Revision history for this message
Mackenzie Morgan (maco.m) wrote :
Changed in atftp (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Iain Lane (laney) wrote :

Uploaded, thanks for your work. Please forward this patch upstream if it's not already (I didn't check).

Changed in atftp (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package atftp - 0.7.dfsg-6ubuntu1

---------------
atftp (0.7.dfsg-6ubuntu1) jaunty; urgency=low

  * Stop atftp from crashing on 0-byte error strings (LP: #309746)
    Patch by Jakob Hilmer

 -- Mackenzie Morgan <email address hidden> Sun, 22 Mar 2009 15:10:44 -0400

Changed in atftp:
status: Fix Committed → Fix Released
Revision history for this message
Artur Rona (ari-tczew) wrote :

 atftp (0.7.dfsg-7) unstable; urgency=low

   * Crash fix. Closes: #514521
   * Updated sv.po. Closes: #503348
   * Added support for logging to stdout. Closes: #484739
   * Added the --listen-local patch. Closes: #366632
   * Recommends inet-superserver. Closes: #516407

 -- Ludovic Drolez <email address hidden> Wed, 01 Apr 2009 17:03:07 +0200

Changed in atftp (Debian):
importance: Unknown → Undecided
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.