Why are river and sliver pronounced with a short vowel, but rover and slider pronounced with long vowels? Is it because the latter two examples are words made by attaching the -er suffix to an existing word (with a long vowel), or something else? If the former, why is cover not pronounced with short vowel (ie. why does it sound like the 'o' in 'covet' instead of the 'o' in comet?) (and, on that point, why is the 'o' in covet and comet different?)
Is it because the latter two examples are words made by attaching the -er suffix to an existing word (with a long vowel)
Yes, the "long vowel" sounds in the pronunciation of rover and slider are predictable from a rule assuming you know the pronunciations of rove and slide. When the derivational suffix -er is added to a word pronounced with a long vowel followed by a consonant sound and spelled with "vowel letter - consonant letter - silent e", it forms a new word spelled with "vowel letter - consonant letter - er" that is pronounced with a long vowel as a rule.
When the base happens to be pronounced with an irregular vowel sound, the derived word ending in the suffix -er will also be pronounced with that same irregular vowel sound: e.g. have and haver are both pronounced with the "short a" sound, love and lover are both pronounced with the "short u" sound.
For river and sliver, the rule is that there is no rule for the pronunciation of words like this. That is, no simple rule reliably gives the pronunciation of words that do not end in the suffix -er, but just happen to have spellings that end with vowel letter - consonant letter - er. Words with this spelling pattern can be pronounced with "long vowels" (such as clover), "short vowels" (such as proper), or other pronunciations of the vowel letters, such as your example of cover. Spelling irregularities in unsuffixed words have various historical origins, and usually have to be memorized word by word.
As far as I can tell, it's something named "Tenseness Reversal". As described in Background to English Pronunciation by Ádám Nádasdy (2006, ISBN 9631957918, p. 155), it means
a pronunciation where the letter has one of its standard values, but violates a tense/lax choice rule. The grapheme has the “wrong” tenseness value: it is tense when it should be lax, or vice versa. For example, rānge /reɪndʒ/ is a Tenseness Reversal because the a is tense even though it is in covered position. Still, its pronunciation, /eɪ/, is one of the standard sound values of the vowel-letter a. It is only the “tenseness value” (the tense/lax choice) which is irregular (“reversed”). In Tenseness Reversals the vowel-letter picks an unexpected value from its own row in Table 9.7, but does not take on the pronunciation of some other vowel-letter. Tenseness Reversals are fairly frequent, especially the free vowel-letters may be lax without explanation (cĭty).
Concerning free and covered graphic positions (from pp. 153–154):
By the graphic position of a letter we mean the letters that immediately follow it in spelling, whether these are pronounced or not. […] In the following discussion the symbol “C” will stand for a consonant-letter, “V” for a vowel-letter. “S” will mean stop (/p, b/ etc.) and “L”, liquid (/l, r/). The symbol # represents the end of a word. Note that the grapheme x counts as two consonant-letters (as it represents two sounds). Conversely, the digraphs ph, th, ch count as one consonant-letter (as they represent a single sound). A single vowel-letter is in covered graphic position if it is followed (a) by two (or more) consonant-letters (the VCC arrangement): haMMer, doCTor, kiSS, luCK, […] (b) by one final consonant-letter (the VC# arrangement): haM, doG, myTH, caR, fuR, […] A single vowel-letter is in free graphic position in all other cases; that is, if it is followed (c) by one consonant-letter plus a vowel-letter (the VCV arrangement): caPE, leGAl, laZY, caRE, […] (d) by two consonant-letters plus a vowel-letter IF the first consonant-letter is a stop, the second a liquid /l/ or /r/ […]: [e.g.] caBLe, cyCList. (e) by another vowel-letter (the VV arrangement): poEtry, chaOs, ruIn, liE, duE. (f) by nothing (the V# arrangement): go, flu, apply, he.
So river and sliver belong to type (c), they are in free graphic position, but their stressed vowels are affected by Tenseness Reversal. Page 169 in the same book lists some more cases:
lĭve (v), gĭve; mĭsery, lĭnen, rĭsen, gĭven, drĭven, consĭder, lĭver, delĭver, shĭver, Brĭtish, Brĭtain, lĭquor /ˈlɪkə/, cĭty, pĭty, lĭly, prĭson, vĭgour, sy̆rup, cĭtrus, spĭnach, ĭdyll, sy̆ringe, lĭzard, wĭzard, Phĭlip, vĭcar, ĭmage, envĭsage, trĭple…
On the same page, there are examples for the opposite as well:
kīnd, (re)mīnd, behīnd, fīnd, grīnd, bīnd, blīnd, to wīnd (v); wīld, chīld, mīld; fīght, sīgh… (all words with igh); sīgn, alīgn, resīgn, desīgn, benīgn, paradīgm; clīmb, pīnt, nīnth, Chrīst; īsle /aɪl/, īsland, vīscount /ˈvaɪkaʊnt/, Carlīsle /kɑːˈlaɪl/, Pīsces /ˈpaɪsiːz/, indīct /ɪnˈdaɪt/; īsolate, hībernate, dīnosaur, dȳnamite, mīcrophone…
There are some more rules too determining the "normal" tenseness of a vowel letter aside from these free/covered position rules, such as trisyllabic laxing, laxing by suffix, laxing by free U, CiV laxing, and CiV tensing (as well as pre-R breaking and pre-R broadening). On the other hand, tenseness reversal can be seen as a type of irregularity, and the words affected need to be memorized by non-native speakers one by one.
A shorter edition by a different author (without word lists) is available here: http://gepeskonyv.btk.elte.hu/adatok/Anglisztika/43B%E9rces/Tank%F6nyv/Chapter12.pdf