REVIEW: http://review.gluster.org/8189 (Glusterfs/posix: Stack corruption in posix_handle_pump) posted (#1) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/8189 (Glusterfs/posix: Stack corruption in posix_handle_pump) posted (#2) for review on master by N Balachandran (nbalacha)
COMMIT: http://review.gluster.org/8189 committed in master by Pranith Kumar Karampuri (pkarampu) ------ commit ac4c203bfb4c3ebe48a08ef695ee462ba9b5e2c7 Author: Nithya Balachandran <nbalacha> Date: Fri Jun 27 16:28:52 2014 +0530 Glusterfs/posix: Stack corruption in posix_handle_pump posix_handle_pump can corrupt the stack if the buffer passed to it is too small to hold the final path. Fix : Check if the buffer is sufficiently large to hold the new path component before modifying it. This will prevent the buffer overrun but the path returned will most likely have too many symbolic links causing subsequent file ops to fail with ELOOP. The callers of this function do not currently check the return value. The code needs to be modified to have all callers check the return value and take appropriate action in case of an error. Change-Id: I6d9589195a4b0d971a107514ded6e97381e5982e BUG: 1113960 Signed-off-by: Nithya Balachandran <nbalacha> Reviewed-on: http://review.gluster.org/8189 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra G <rgowdapp> Reviewed-by: Pranith Kumar Karampuri <pkarampu> Tested-by: Pranith Kumar Karampuri <pkarampu>
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#3) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#4) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#7) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#8) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#9) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#10) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#11) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#12) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#13) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#14) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#15) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#16) for review on master by N Balachandran (nbalacha)
REVIEW: http://review.gluster.org/9289 (Storage/posix : Adding error checks in path formation) posted (#17) for review on master by N Balachandran (nbalacha)
COMMIT: http://review.gluster.org/9289 committed in master by Raghavendra Bhat (raghavendra) ------ commit f1c4ce0e220a46b7a43c9303c0d137498d421101 Author: Nithya Balachandran <nbalacha> Date: Wed Dec 17 13:58:56 2014 +0530 Storage/posix : Adding error checks in path formation Renaming directories can cause the size of the buffer required for posix_handle_path to increase between the first call, which calculates the size, and the second call which forms the path in the buffer allocated based on the size calculated in the first call. The path created in the second call overflows the allocated buffer and overwrites the stack causing the brick process to crash. The fix adds a buffer size check to prevent the buffer overflow. It also checks and returns an error if the posix_handle_path call is unable to form the path instead of working on the incomplete path, which is likely to cause subsequent calls using the path to fail with ELOOP. Preventing buffer overflow and handling errors BUG: 1113960 Change-Id: If3d3c1952e297ad14f121f05f90a35baf42923aa Signed-off-by: Nithya Balachandran <nbalacha> Reviewed-on: http://review.gluster.org/9289 Reviewed-by: Pranith Kumar Karampuri <pkarampu> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra Bhat <raghavendra>
REVIEW: http://review.gluster.org/9702 (Storage/posix : Adding error checks in path formation) posted (#1) for review on master by N Balachandran (nbalacha)
COMMIT: http://review.gluster.org/9702 committed in master by Raghavendra Bhat (raghavendra) ------ commit d8f181d3171ed301a9992615083fcf98992577c8 Author: Nithya Balachandran <nbalacha> Date: Thu Feb 19 17:30:35 2015 +0530 Storage/posix : Adding error checks in path formation Modified a few log messages added for this fix. Also set the op_errno in an error check. Change-Id: I87caf2f89031aedad1aaee001aef54896dbecd3b BUG: 1113960 Signed-off-by: Nithya Balachandran <nbalacha> Reviewed-on: http://review.gluster.org/9702 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu> Reviewed-by: Raghavendra Bhat <raghavendra>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report. glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user