Hi Eric,
kernel test robot noticed the following build errors:
[auto build test ERROR on horms-ipvs/master]
[cannot apply to net/main net-next/main linus/master v7.2 next-20260818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-atm-fix-slab-out-of-bounds-read-in-vcc_setsockopt/20260804-145806
base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
patch link: https://lore.kernel.org/r/20260804145806.2112004-1-edumazet%40google.com (local)
patch subject: [PATCH net] net/atm: fix slab-out-of-bounds read in vcc_setsockopt()
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20260820/202608200206.vI8yz6EN-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260820/202608200206.vI8yz6EN-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202608200206.vI8yz6EN-lkp@intel.com/ (local)
All errors (new ones prefixed by >>):
net/atm/common.c: In function 'vcc_setsockopt':
quoted
net/atm/common.c:763:25: error: implicit declaration of function 'copy_safe_from_sockptr'; did you mean 'copy_from_sockptr'? [-Wimplicit-function-declaration]
763 | error = copy_safe_from_sockptr(&qos, sizeof(qos), optval, optlen);
| ^~~~~~~~~~~~~~~~~~~~~~
| copy_from_sockptr
vim +763 net/atm/common.c
746
747 int vcc_setsockopt(struct socket *sock, int level, int optname,
748 sockptr_t optval, unsigned int optlen)
749 {
750 struct atm_vcc *vcc;
751 unsigned long value;
752 int error;
753
754 if (__SO_LEVEL_MATCH(optname, level) && optlen != __SO_SIZE(optname))
755 return -EINVAL;
756
757 vcc = ATM_SD(sock);
758 switch (optname) {
759 case SO_ATMQOS:
760 {
761 struct atm_qos qos;
762
> 763 error = copy_safe_from_sockptr(&qos, sizeof(qos), optval, optlen);
764 if (error)
765 return error;
766 error = check_qos(&qos);
767 if (error)
768 return error;
769 if (sock->state == SS_CONNECTED)
770 return atm_change_qos(vcc, &qos);
771 if (sock->state != SS_UNCONNECTED)
772 return -EBADFD;
773 vcc->qos = qos;
774 set_bit(ATM_VF_HASQOS, &vcc->flags);
775 return 0;
776 }
777 case SO_SETCLP:
778 error = copy_safe_from_sockptr(&value, sizeof(value), optval, optlen);
779 if (error)
780 return error;
781 if (value)
782 vcc->atm_options |= ATM_ATMOPT_CLP;
783 else
784 vcc->atm_options &= ~ATM_ATMOPT_CLP;
785 return 0;
786 default:
787 return -EINVAL;
788 }
789 }
790
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki