[lxc-devel] [lxc/lxc] 5da6aa: coverity: ifr_name buffer not NULL terminated

GitHub noreply at github.com
Tue Oct 29 14:39:06 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 5da6aa8c717f11f99a1e169cb5df47db7656f662
      https://github.com/lxc/lxc/commit/5da6aa8c717f11f99a1e169cb5df47db7656f662
  Author: Dwight Engen <dwight.engen at oracle.com>
  Date:   2013-10-29 (Tue, 29 Oct 2013)

  Changed paths:
    M src/lxc/conf.c
    M src/lxc/lxc_user_nic.c
    M src/lxc/network.c

  Log Message:
  -----------
  coverity: ifr_name buffer not NULL terminated

The kernel (net/core/dev_ioctl.c:dev_ioctl()) is going to NULL terminate
this name after the copy-in of the ifr, so even though this is a fixed
sized array the last byte isn't usable as part of the name. All the ioctls
we're using go through this code path.

Use the ifr name in the DEBUG message in case it was possibly truncated.

Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>





More information about the lxc-devel mailing list