func (m *SnapManager) ensureVulnerableSnapRemoved(name string) error {
var removedYet bool
- key := fmt.Sprintf("%s-snap-cve-2021-44731-vuln-removed", name)
+ key := fmt.Sprintf("%s-snap-cve-2022-3328-vuln-removed", name)
if err := m.state.Get(key, &removedYet); err != nil && err != state.ErrNoState {
return err
}
if err != nil {
return err
}
- // res is < 0 if "ver" is lower than "2.54.3"
- res, err := strutil.VersionCompare(ver, "2.54.3")
+ // res is < 0 if "ver" is lower than "2.57.6"
+ res, err := strutil.VersionCompare(ver, "2.57.6")
if err != nil {
return err
}
// we have to remove vulnerable versions of both the core and snapd snaps
// only when we now have fixed versions installed / active
- // the fixed version is 2.54.3, so if the version of the current core/snapd
+ // the fixed version is 2.57.6, so if the version of the current core/snapd
// snap is that or higher, then we proceed (if we didn't already do this)
if err := m.ensureVulnerableSnapRemoved("snapd"); err != nil {
// make the currently installed snap info file fixed but an old version
// vulnerable
fixedInfoFile := `
-VERSION=2.54.3+git1.g479e745-dirty
+VERSION=2.57.6+git1.g479e745-dirty
SNAPD_APPARMOR_REEXEC=0
`
vulnInfoFile := `
-VERSION=2.54.2+git1.g479e745-dirty
+VERSION=2.57.5+git1.g479e745-dirty
SNAPD_APPARMOR_REEXEC=0
`
// and we set the appropriate key in the state
var removeDone bool
- st.Get(snapName+"-snap-cve-2021-44731-vuln-removed", &removeDone)
+ st.Get(snapName+"-snap-cve-2022-3328-vuln-removed", &removeDone)
c.Assert(removeDone, Equals, true)
}
c.Assert(ensureErr, ErrorMatches, fmt.Sprintf(`cannot open snapd info file "%s".*`, infoFileFor("snapd")))
st.Lock()
- st.Set("snapd-snap-cve-2021-44731-vuln-removed", true)
+ st.Set("snapd-snap-cve-2022-3328-vuln-removed", true)
st.Unlock()
// still unhappy about core file missing
// but with core state flag set too, we are now happy
st.Lock()
- st.Set("core-snap-cve-2021-44731-vuln-removed", true)
+ st.Set("core-snap-cve-2022-3328-vuln-removed", true)
st.Unlock()
ensureErr = s.snapmgr.Ensure()
// now it should stop trying to check if state says so
st := s.state
st.Lock()
- st.Set(snapName+"-snap-cve-2021-44731-vuln-removed", true)
+ st.Set(snapName+"-snap-cve-2022-3328-vuln-removed", true)
st.Unlock()
ensureErr = s.snapmgr.Ensure()