summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-11-18 22:57:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-08 08:44:05 +0100
commitb9792534888b83630f1b3442d8a3d162228e8a0d (patch)
treee5704a2669c0439ca52c5d0f2f99c54d221a57ee /tools
parenta4b1eb9ff9ac5121bf2a2e967aacebfeb0a8f085 (diff)
ALSA: ctxfi: Fix out-of-range access
commit 76c47183224c86e4011048b80f0e2d0d166f01c2 upstream. The master and next_conj of rcs_ops are used for iterating the resource list entries, and currently those are supposed to return the current value. The problem is that next_conf may go over the last entry before the loop abort condition is evaluated, and it may return the "current" value that is beyond the array size. It was caught recently as a GPF, for example. Those return values are, however, never actually evaluated, hence basically we don't have to consider the current value as the return at all. By dropping those return values, the potential out-of-range access above is also fixed automatically. This patch changes the return type of master and next_conj callbacks to void and drop the superfluous code accordingly. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214985 Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20211118215729.26257-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions