Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0, 7.2.0
-
Untriaged
-
0
-
Unknown
Description
Magma's filesystem wrapper has a bug where if a pwrite is retried due to a partial write or EINTR or EAGAIN, we use the original length ie. the length of the partial write is not decremented correctly. This can result in segfaults(since we are writing a length greater than buffer length) or WAL corruption since the WAL tried repair of blocks.
This is the incorrect lines of code, we should be using nwrite instead of len.
This was noticed while reviewing code for MB-56097 and is a must fix.