[CRIU] [PATCH 0/9] Buffer overruns etc.

Kir Kolyshkin kir at openvz.org
Wed Oct 7 02:43:20 PDT 2015


Here are a set of small fixes after checking the sources with
Coverity scanner (which found most but not all of issues
fixed here). Most of the fixes look worthwhile to me.

After applying this series, Coverity reports 14 defects eliminated.

Please review carefully, I'm not familiar with the codebase,
nor did I tested these changes.

Kir Kolyshkin (9):
  restore_root_task(): don't fiddle with closed fd
  read_fd_link(): don't overrun buf
  read_ns_sys_file(): don't overrun buf
  read_ns_sys_file(): check if buf is long enough
  __userns_sysctl_op(): fix a check
  sysctl_op(): fix check for known ns mask
  Use strlcpy
  check_path_remap(): fix error checks
  parse_pid_stat(): minor optimization

 cr-dump.c    |  8 +++++---
 cr-restore.c |  4 +++-
 files-reg.c  |  6 +++---
 lib/criu.c   |  3 ++-
 net.c        | 14 ++++++++++----
 proc_parse.c |  6 +++---
 sysctl.c     |  4 ++--
 util.c       |  2 +-
 8 files changed, 29 insertions(+), 18 deletions(-)

-- 
2.4.3



More information about the CRIU mailing list