[integrity:next-ima-new-check-module-syscall 32/34] kernel/module.c:2450 copy_module_from_user() warn: maybe return -EFAULT instead of the bytes remaining?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kees,

FYI, there are new smatch warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-ima-new-check-module-syscall
head:   3167cf7685efd4855ed9e52e8b2470e8d2dcbf9c
commit: e0eb8f8fe012a54af6d00e0d1573cf1c824023d4 [32/34] module: add syscall to load module from fd

All smatch warnings:

  arch/x86/include/asm/stacktrace.h:112 caller_frame_pointer() error: potentially derefencing uninitialized 'frame'.
  arch/x86/include/asm/jump_label.h:25 arch_static_branch() info: ignoring unreachable code.
+ kernel/module.c:2450 copy_module_from_user() warn: maybe return -EFAULT instead of the bytes remaining?

vim +2450 kernel/module.c
  2440			goto free_hdr;
  2441	
  2442		err = check_info(info);
  2443		if (err)
  2444			goto free_hdr;
  2445	
  2446		return err;
  2447	
  2448	free_hdr:
  2449		vfree(info->hdr);
> 2450		return err;
  2451	}
  2452	
  2453	/* Sets info->hdr and info->len. */
  2454	int copy_module_from_fd(int fd, struct load_info *info)
  2455	{
  2456		struct file *file;
  2457		int err;
  2458		struct kstat stat;
  2459		unsigned long size;
  2460		off_t pos;

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@xxxxxxxxxxxxxxx>                     Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux