View Issue Details

IDProjectCategoryView StatusLast Update
0001211bareos-core[All Projects] directorpublic2020-03-18 10:16
ReporterpstorzAssigned Topstorz 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
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.
bareos-master: impactyes
bareos-master: actionfixed
bareos-19.2: impactyes
bareos-19.2: actionfixed
bareos-18.2: impactno
bareos-18.2: action
bareos-17.2: impactno
bareos-17.2: action
bareos-16.2: impactno
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

related to 0001187 confirmedarogge_adm Release Bareos 19.2.7 

Activities

arogge

arogge

2020-03-18 10:16

developer   ~0003896

Fixed in master and 19.2

Related Changesets

bareos: master b0cb4ef3

2020-03-16 12:35:01

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 12:35:01

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 View Revisions
2020-03-16 13:52 pstorz Steps to Reproduce Updated View Revisions
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 bareos-master: impact => yes
2020-03-18 10:16 arogge bareos-master: action => fixed
2020-03-18 10:16 arogge bareos-19.2: impact => yes
2020-03-18 10:16 arogge bareos-19.2: action => fixed
2020-03-18 10:16 arogge bareos-18.2: impact => no
2020-03-18 10:16 arogge bareos-17.2: impact => no
2020-03-18 10:16 arogge bareos-16.2: impact => no
2020-03-18 10:16 arogge Note Added: 0003896