Whamcloud - gitweb
LU-18608 pcc: fix INTEGER_OVERFLOW in pcc_file_read_iter() 11/57611/8
authorQian Yingjin <qian@ddn.com>
Sat, 28 Dec 2024 16:10:16 +0000 (00:10 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:04:35 +0000 (04:04 +0000)
commit392b141233c0831edfd8b9378988c94525c8a5bb
treeb018c99633ea92ddd6d03d794038b0cd77aecbeb
parent0c364cf6f70818863ac08045470abe858af37839
LU-18608 pcc: fix INTEGER_OVERFLOW in pcc_file_read_iter()

Fixing the possible INTEGER_OVERFLOW issue reported from Coverity.

  /lustre/llite/pcc.c: 2643 in pcc_file_read_iter()
  2641         iocb->ki_filp = file;
  2642         pcc_io_fini(inode, PIT_READ, result, cached);
   CID 454276:  Insecure data handling  (INTEGER_OVERFLOW)
     "result", which might have overflowed,
     is returned from the function.
  2643         RETURN(result);

Test-Parameters: trivial testlist=sanity-pcc
CoverityID: 454276 ("Insecure data handing")
Fixes: ce98bfe5f72 ("LU-10499 pcc: add readonly mode for PCC")
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ib856b7598441c06e0fcfe2e7f1eb4eef4d3d82b7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57611
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/pcc.c