From: kernel test robot <lkp@intel.com>
To: Kyle Zeng <kylebot@openai.com>, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Jan Kara <jack@suse.com>,
outbounddisclosures@openai.com, Kyle Zeng <kylebot@openai.com>
Subject: Re: [PATCH v2] udf: validate extent partition references in udf_current_aext()
Date: Sat, 13 Jun 2026 15:06:49 +0800 [thread overview]
Message-ID: <202606131500.3pJCF54j-lkp@intel.com> (raw)
In-Reply-To: <20260612225846.97678-1-kylebot@openai.com>
Hi Kyle,
kernel test robot noticed the following build errors:
[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v7.1-rc7 next-20260612]
[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/Kyle-Zeng/udf-validate-extent-partition-references-in-udf_current_aext/20260613-070817
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20260612225846.97678-1-kylebot%40openai.com
patch subject: [PATCH v2] udf: validate extent partition references in udf_current_aext()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260613/202606131500.3pJCF54j-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260613/202606131500.3pJCF54j-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606131500.3pJCF54j-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/udf/inode.c:2154:22: warning: unused variable 'sbi' [-Wunused-variable]
2154 | struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
| ^~~
>> fs/udf/inode.c:2303:37: error: use of undeclared identifier 'sbi'
2303 | if (eloc->partitionReferenceNum >= sbi->s_partitions) {
| ^~~
fs/udf/inode.c:2305:35: error: use of undeclared identifier 'sbi'
2305 | eloc->partitionReferenceNum, sbi->s_partitions);
| ^~~
1 warning and 2 errors generated.
vim +/sbi +2303 fs/udf/inode.c
2242
2243 /*
2244 * Returns 1 on success, -errno on error, 0 on hit EOF.
2245 */
2246 int udf_current_aext(struct inode *inode, struct extent_position *epos,
2247 struct kernel_lb_addr *eloc, uint32_t *elen, int8_t *etype,
2248 int inc)
2249 {
2250 int alen;
2251 uint8_t *ptr;
2252 struct short_ad *sad;
2253 struct long_ad *lad;
2254 struct udf_inode_info *iinfo = UDF_I(inode);
2255
2256 if (!epos->bh) {
2257 if (!epos->offset)
2258 epos->offset = udf_file_entry_alloc_offset(inode);
2259 ptr = iinfo->i_data + epos->offset -
2260 udf_file_entry_alloc_offset(inode) +
2261 iinfo->i_lenEAttr;
2262 alen = udf_file_entry_alloc_offset(inode) +
2263 iinfo->i_lenAlloc;
2264 } else {
2265 struct allocExtDesc *header =
2266 (struct allocExtDesc *)epos->bh->b_data;
2267
2268 if (!epos->offset)
2269 epos->offset = sizeof(struct allocExtDesc);
2270 ptr = epos->bh->b_data + epos->offset;
2271 if (check_add_overflow(sizeof(struct allocExtDesc),
2272 le32_to_cpu(header->lengthAllocDescs), &alen))
2273 return -1;
2274
2275 if (alen > epos->bh->b_size)
2276 return -1;
2277 }
2278
2279 switch (iinfo->i_alloc_type) {
2280 case ICBTAG_FLAG_AD_SHORT:
2281 sad = udf_get_fileshortad(ptr, alen, &epos->offset, inc);
2282 if (!sad)
2283 return 0;
2284 *etype = le32_to_cpu(sad->extLength) >> 30;
2285 eloc->logicalBlockNum = le32_to_cpu(sad->extPosition);
2286 eloc->partitionReferenceNum =
2287 iinfo->i_location.partitionReferenceNum;
2288 *elen = le32_to_cpu(sad->extLength) & UDF_EXTENT_LENGTH_MASK;
2289 break;
2290 case ICBTAG_FLAG_AD_LONG:
2291 lad = udf_get_filelongad(ptr, alen, &epos->offset, inc);
2292 if (!lad)
2293 return 0;
2294 *etype = le32_to_cpu(lad->extLength) >> 30;
2295 *eloc = lelb_to_cpu(lad->extLocation);
2296 *elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK;
2297 break;
2298 default:
2299 udf_debug("alloc_type = %u unsupported\n", iinfo->i_alloc_type);
2300 return -EINVAL;
2301 }
2302
> 2303 if (eloc->partitionReferenceNum >= sbi->s_partitions) {
2304 udf_debug("invalid partition reference %u (partitions %u)\n",
2305 eloc->partitionReferenceNum, sbi->s_partitions);
2306 return -EFSCORRUPTED;
2307 }
2308
2309 return 1;
2310 }
2311
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-06-13 7:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 22:58 [PATCH v2] udf: validate extent partition references in udf_current_aext() Kyle Zeng
2026-06-13 6:44 ` kernel test robot
2026-06-13 7:06 ` kernel test robot [this message]
2026-06-13 8:46 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202606131500.3pJCF54j-lkp@intel.com \
--to=lkp@intel.com \
--cc=jack@suse.com \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=outbounddisclosures@openai.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.