[PATCH v2][next] octeontx2-pf: Fix out-of-bounds read warning in otx2_get_fecparam()

2021-02-12 Thread Hariprasad Kelam
akub Kicinski ; Jesse > Brandeburg ; Christina Jacob > > Cc: net...@vger.kernel.org; linux-kernel@vger.kernel.org; Gustavo A. R. > Silva > Subject: [EXT] [PATCH v2][next] octeontx2-pf: Fix out-of-bounds read > warning in otx2_get_fecparam() > > Line at 967 implies that rsp->f

[PATCH v2][next] octeontx2-pf: Fix out-of-bounds read warning in otx2_get_fecparam()

2021-02-12 Thread Gustavo A. R. Silva
Line at 967 implies that rsp->fwdata.supported_fec may be up to 4: if (rsp->fwdata.supported_fec <= FEC_MAX_INDEX) which would cause an out-of-bounds read at line 971: fecparam->fec = fec[rsp->fwdata.supported_fec]; However, the range of values for rsp->fwdata.supported_fec is 0 to 3. Fix the