Skip to content

Tail: Tag mode#4

Closed
bamx23 wants to merge 3 commits intocoreutils:masterfrom
bamx23:tail
Closed

Tail: Tag mode#4
bamx23 wants to merge 3 commits intocoreutils:masterfrom
bamx23:tail

Conversation

@bamx23
Copy link

@bamx23 bamx23 commented Nov 16, 2015

No description provided.

@bamx23 bamx23 closed this Nov 16, 2015
pixelb added a commit to pixelb/coreutils that referenced this pull request Oct 31, 2016
This was detected in about 25% of runs with gcc -fsanitize=address

  ERROR: AddressSanitizer: global-buffer-overflow on address ...
  READ of size 4 at 0x000000416628 thread T0
    #0 0x40479f in genpattern src/shred.c:782
    coreutils#1 0x4050d9 in do_wipefd src/shred.c:921
    coreutils#2 0x406203 in wipefile src/shred.c:1175
    coreutils#3 0x406b84 in main src/shred.c:1316
    coreutils#4 0x7f3454a1ef9f in __libc_start_main (/lib64/libc.so.6+0x1ff9f)
    coreutils#5 0x4025d8 (/tmp/coreutils-8.23/src/shred+0x4025d8)
  0x000000416628 is located 56 bytes to the left of
  global variable '*.LC49' from 'src/shred.c' (0x416660) of size 17
  0x000000416628 is located 12 bytes to the right of
  global variable 'patterns' from 'src/shred.c' (0x416540) of size 220
  SUMMARY: AddressSanitizer: global-buffer-overflow src/shred.c:782

* src/shred.c (gen_patterns): Restrict pattern selection
to the K available, which regressed due to v5.92-1462-g65533e1.
* tests/misc/shred-passes.sh: Add a deterministic test case.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/20998
hubot pushed a commit that referenced this pull request Nov 29, 2016
This was detected with:
  echo a > a; pr "-S$(printf "\t\t\t")" a -m a > /dev/null
Resulting in ASAN triggering:
  ====================================================
  ERROR: AddressSanitizer: global-buffer-overflow
  READ of size 1 at 0x00000041b622 thread T0
    #0 0x40506a in print_sep_string ../src/pr.c:2241
    #1 0x407ec4 in read_line ../src/pr.c:2493
    #2 0x40985c in print_page ../src/pr.c:1802
    #3 0x40985c in print_files ../src/pr.c:1618
    #4 0x4036e0 in main ../src/pr.c:1136

* src/pr.c (init_parameters): Ensure we only override the
specified separator when it's a single tab, thus matching
the calculated separator length.
* tests/pr/pr-tests.pl: Add a test case.
* NEWS: Mention the fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant