Project

General

Profile

Bug #1649

Buffer overflow in pdb2gmx with invalid r2b files

Added by Berk Hess almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The function read_rtprename in pdb2gmx.c scans strings with sscanf into buffers of 6 chars. Residue and rtp names should be shorter than that, but any (invalid) input with longer strings will cause a buffer overflow and will cause pdb2gmx to segfault.

Associated revisions

Revision 501ce598 (diff)
Added by Erik Lindahl over 2 years ago

Fix potential buffer overflow in pdb2gmx

Residue rename database entries were read into 6-char
string variables. We now check and issue fatal errors
if the lengths are above 5 characters.

Fixes #1649.

Change-Id: Id4d88a565b212ef279d400f42b5f2732550eded6

History

#1 Updated by Mark Abraham almost 3 years ago

  • Target version changed from 5.0.3 to 5.0.4

#2 Updated by Mark Abraham almost 3 years ago

  • Target version changed from 5.0.4 to 5.0.5

#3 Updated by Mark Abraham over 2 years ago

  • Target version changed from 5.0.5 to 5.0.6

#4 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related patchset '1' for Issue #1649.
Uploader: Erik Lindahl ()
Change-Id: I826539b706b14f3dbf936ffa56f48164fabaa164
Gerrit URL: https://gerrit.gromacs.org/4736

#5 Updated by Erik Lindahl over 2 years ago

  • Status changed from Accepted to Fix uploaded

#6 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related patchset '1' for Issue #1649.
Uploader: Erik Lindahl ()
Change-Id: Id4d88a565b212ef279d400f42b5f2732550eded6
Gerrit URL: https://gerrit.gromacs.org/4740

#7 Updated by Rossen Apostolov over 2 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF