Entreprise d'experts en Sécurité Informatique : Audits et conseils en cybersécurité
Entreprise française de cybersécurité depuis 2004
☎ 03 60 47 09 81 - info@securiteinfo.com


CVE-2024-56740

Description

In the Linux kernel, the following vulnerability has been resolved:nfs/localio: must clear res.replen in nfs_local_read_doneOtherwise memory corruption can occur due to NFSv3 LOCALIO readsleaving garbage in res.replen:- nfs3_read_done() copies that into server->read_hdrsize; from there nfs3_proc_read_setup() copies it to args.replen in new requests.- nfs3_xdr_enc_read3args() passes that to rpc_prepare_reply_pages() which includes it in hdrsize for xdr_init_pages, so that rq_rcv_buf contains a ridiculous len.- This is copied to rq_private_buf and xs_read_stream_request() eventually passes the kvec to sock_recvmsg() which receives incoming data into entirely the wrong place.This is easily reproduced with NFSv3 LOCALIO that is servicing readswhen it is made to pivot back to using normal RPC. This switch backto using normal NFSv3 with RPC can occur for a few reasons but thisissue was exposed with a test that stops and then restarts the NFSv3server while LOCALIO is performing heavy read IO.

POC

Reference

No PoCs from references.

Github

- https://github.com/cku-heise/euvd-api-doc

- https://github.com/fkie-cad/nvd-json-data-feeds