patchGNU tar - Patches: patch #10081, Unitialized data in _gnu_flush_read

 
 

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

patch #10081: Unitialized data in _gnu_flush_read

Submitter:  Mikhail Barashkov <mbarashkov_gnu>
Submitted:  Sun 13 Jun 2021 06:38:52 AM UTC
Votes:  11  
 
Category:  Operations on Archives Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sun 13 Jun 2021 06:38:52 AM UTC, original submission:  

Unitialized buffer issue was detected using protected mode of E2K CPU, which (on hardware level) detects and blocks unitialized data usage and out-of bounds issues.

In this case, when compiled in protected mode, one of the tests failed: test 188.

It was discovered that unitialized data (record_start->buffer) was passed on to check_compressed_archive method, as it was properly allocated in init_buffer, but no data was actually read in _gnu_flush_read.

As it turned out, after rmtread is called to read data to record_start->buffer, result (obviously) can be:
status < record_size, leaving at least part of record_start->buffer unitialized.

This patch fills the unread part of buffer with zeroes. And with it all tests pass on E2K protected mode as well.

Mikhail Barashkov <mbarashkov_gnu>

 

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

Attached Files
file #51553:  gnu_flush_read_fix_unintialized_buffer.patch added by mbarashkov_gnu (636B - application/octet-stream - In this patch file, tabulation is replaced with spaces.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by shigorin (Voted in favor of this item)
  • -email is unavailable- added by mbarashkov_gnu (Voted in favor of this item)
  • -email is unavailable- added by mbarashkov_gnu (Submitted the item)
  •  

    There are 11 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
    2021-06-19 shigorin Carbon-Copy- Added shigorin
    2021-06-13 mbarashkov_gnu Attached File- Added gnu_flush_read_fix_unintialized_buffer.patch, #51553
    2021-06-13 mbarashkov_gnu Carbon-Copy- Added mbarashkov_gnu
    2021-06-13 mbarashkov_gnu Attached File- Added gnu_flush_read_fix_unintialized_buffer.patch, #51552

    Back to the top


    Powered by Savane 3.9