Description of problem: /bin/cut has following input validation problem: 22:16:34 [wojtek ~]$ gdb /bin/cut GNU gdb Red Hat Linux (5.2.1-4) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"...(no debugging symbols found)... (gdb) run -b -9999999999999999 Starting program: /bin/cut -b -9999999999999999 /bin/cut: memory exhausted (no debugging symbols found)...(no debugging symbols found)... Program exited with code 01. (gdb) run -b -9999999999999999999999999999999999999999 Starting program: /bin/cut -b -9999999999999999999999999999999999999999 (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x08048fbf in set_fields () (gdb) bt #0 0x08048fbf in set_fields () #1 0x0804995c in main () #2 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 (gdb) Version-Release number of selected component (if applicable): textutils-2.0.21-5 How reproducible: /bin/cut -b -99999999999999999999999999999999 Steps to Reproduce: 1. above 2. 3. Actual results: SIGSEGV or Mem Exhausted Expected results: Additional info: Can lead to overwrite mem of other processes (not checked).
> Can lead to overwrite mem of other processes (not checked). Linux uses memory protection to prevent one process from accidentally overwriting the memory of another. But I agree that it's bad behaviour for cut.