patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9626, TFTP Server should make sure...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9626: TFTP Server should make sure filename is \0 terminated

Submitter:  Malte <malte>
Submitted:  Wed 25 Apr 2018 03:55:50 PM UTC
   
 
Category:  Contrib Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Wed 25 Apr 2018 06:37:46 PM UTC, comment #1: 

This has already been fixed a year ago in git master. Time for a release based on master (instead of the 2.0.x bugfix releases, where this has been forgotten)...

See also bug #50534 and commit 59973c96

Simon Goldschmidt <goldsimon>
Group administrator
Wed 25 Apr 2018 03:55:50 PM UTC, original submission:  

Hi,
the TFTP server copies the filename into the local buffer "filename". However only the length of the string is copied, so if the filename is \0 terminated depends on the uninitialized data of the buffer.
Example: assuming a filename of one char:
pbuf_memfind will set filename_end_offset = 3
3-2=1 -> only one char without \0 will be copied.
The attached patch should fix the issue by copying \0 too.

Malte <malte>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #44030:  tftp_serverNull.patch added by malte (822B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by malte (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-25 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2018-04-25 malte Attached File- Added tftp_serverNull.patch, #44030

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code