Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,760
    • Issues 2,760
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 921
    • Merge requests 921
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #3014
Closed
Open
Created May 20, 2020 by Rafał Mikrut@qarmin

Possible array out of bounds in brw_vec4_nir.cpp

https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/intel/compiler/brw_vec4_nir.cpp#L1000-1006

      float f[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
      bool is_scalar = true;

      for (unsigned i = 0; i < NIR_MAX_VEC_COMPONENTS; i++) {
         if (nir_alu_instr_channel_used(instr, idx, i)) {
            f[i] = nir_src_comp_as_float(instr->src[idx].src,
                                         instr->src[idx].swizzle[i]);

f is array with 4 elements but NIR_MAX_VEC_COMPONENTS(16) may access it in 15 element

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking