Re:Douane personal firewall for GNU/Linux
by awordnot on Saturday January 21, 2017 @12:47PM
(#13451148)
I would be careful, a critical buffer overflow vulnerability was just found in the Douane kernel module: https://github.com/Douane/douane-dkms/commit/61023b91fbafab8...
[ Parent
| on HN ]
Re:Douane personal firewall for GNU/Linux
by ramchip on Sunday January 22, 2017 @04:00AM
(#13454342)
Comments like this never fail to make me smile:
+ // Don't do anything if the process_path length is > PATH_LENGTH
+ if (strlen(process_path) > PATH_LENGTH)
+ return;
Re:Douane personal firewall for GNU/Linux
by ori_b on Saturday January 21, 2017 @08:41PM
(#13453102)
And it's still wrong, since strncpy() doesn't null terminate: it null pads. That means that if the string is longer than the buffer, it will not be correctly terminated.
Re:Douane personal firewall for GNU/Linux
by iMerNibor on Saturday January 21, 2017 @09:57PM
(#13453351)
They do check the string size before using strncpy though, so it should be fine
The check is off by one. If it's equal in length to the buffer, then the buffer will not be nul terminated.