In the Linux kernel, the following vulnerability has been resolved:
nfc: fix memory leak of seio context in nfcgenlseio
The callback context for sending/receiving APDUs to/from the selected secure element is allocated inside nfcgenlseio and supposed to be eventually freed in seiocb callback function. However, there are several error paths where the bwitimer is not charged to call seiocb later, and the cb_context is leaked.
The patch proposes to free the cb_context explicitly on those error paths.
At the moment we can't simply check 'dev->ops->se_io()' return value as it may be negative in both cases: when the timer was charged and was not.