View Issue Details

IDProjectCategoryView StatusLast Update
0001211bareos-coredirectorpublic2020-11-30 15:47
Reporterpstorz Assigned Topstorz  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version19.2.6 
Fixed in Version19.2.7 
Summary0001211: bareos director and bareos fd crash when regexwhere is specified
DescriptionThis bug has multiple effects:


1: When doing a restore and specifying a regexwhere manually, the director crashes

2: When specifying the regexwhere in the restore job configuration, the bareos filedaemon crashes.
This happens when the restore is run the second time. The first time it works without crash.

 
Steps To ReproduceConfigure a regexwhere manually in the restore dialog manually to make the dirctor crash.

Configure the regexwhere in the configuration file and use it to crash the file daemon.
TagsNo tags attached.

Relationships

related to 0001187 closedarogge_adm Release Bareos 19.2.7 
related to 0001282 closedarogge Release Bareos 20.0.0 

Activities

arogge

arogge

2020-03-18 10:16

manager   ~0003896

Fixed in master and 19.2

Related Changesets

bareos: master b0cb4ef3

2020-03-16 13:35

pstorz

Ported: N/A

Details Diff
breg: fix crash when manually setting regexwhere

When manually setting the regular expression during restore like with:

OK to run? (yes/mod/no): mod
->11: File Relocation
->4: Enter a regexp
->Please enter a valid regexp (!from!to!): !what!with!
->6: Use this ?

The director crashed. This happens because the member regex_t preg of
the class BareosRegex was not zero initialized correctly.
This caused the freeing of random memory in void regfree(regex_t* preg).

Now all members of class BareosRegex are zero initialized and the
problem is fixed.

This problem also causes the filedaemon to crash when regexwhere is specified
in the restore job configuration. On the second restore run the filedaemon
crashes.

Fixes# 1211: bareos director and bareos fd crash when regexwhere is specified
Affected Issues
0001211
mod - core/src/lib/breg.h Diff File

bareos: bareos-19.2 6faee2bf

2020-03-16 13:35

pstorz

Ported: N/A

Details Diff
breg: fix crash when manually setting regexwhere

When manually setting the regular expression during restore like with:

OK to run? (yes/mod/no): mod
->11: File Relocation
->4: Enter a regexp
->Please enter a valid regexp (!from!to!): !what!with!
->6: Use this ?

The director crashed. This happens because the member regex_t preg of
the class BareosRegex was not zero initialized correctly.
This caused the freeing of random memory in void regfree(regex_t* preg).

Now all members of class BareosRegex are zero initialized and the
problem is fixed.

This problem also causes the filedaemon to crash when regexwhere is specified
in the restore job configuration. On the second restore run the filedaemon
crashes.

Fixes# 1211: bareos director and bareos fd crash when regexwhere is specified
Affected Issues
0001211
mod - core/src/lib/breg.h Diff File

Issue History

Date Modified Username Field Change
2020-03-16 13:24 pstorz New Issue
2020-03-16 13:34 pstorz Status new => acknowledged
2020-03-16 13:34 pstorz Description Updated
2020-03-16 13:52 pstorz Steps to Reproduce Updated
2020-03-18 10:09 arogge Relationship added related to 0001187
2020-03-18 10:12 arogge Changeset attached => bareos master b0cb4ef3
2020-03-18 10:12 arogge Changeset attached => bareos bareos-19.2 6faee2bf
2020-03-18 10:16 arogge Assigned To => pstorz
2020-03-18 10:16 arogge Status acknowledged => resolved
2020-03-18 10:16 arogge Resolution open => fixed
2020-03-18 10:16 arogge Product Version 19.2.7 => 19.2.6
2020-03-18 10:16 arogge Fixed in Version => 19.2.7
2020-03-18 10:16 arogge Note Added: 0003896
2020-04-16 19:29 arogge Status resolved => closed
2020-11-30 15:47 arogge Relationship added related to 0001282