
670 F.3d 532 (2012)
UNITED STATES of America, Plaintiff-Appellee,
v.
Kerney Ray THORNSBURY, Defendant-Appellant.
No. 11-7109.
United States Court of Appeals, Fourth Circuit.
Argued: January 24, 2012.
Decided: March 2, 2012.
*533 ARGUED: Jonathan D. Byrne, Office of the Federal Public Defender, Charleston, West Virginia, for Appellant. John Lanier File, Office of the United States Attorney, Beckley, West Virginia, for Appellee. ON BRIEF: Mary Lou Newberger, Federal Public Defender, David R. Bungard, Assistant Federal Public Defender, Office of the Federal Public Defender, Charleston, West Virginia, for Appellant. R. Booth Goodwin II, United States Attorney, Charleston, West Virginia, for Appellee.
Before WILKINSON, DUNCAN, and AGEE, Circuit Judges.
Dismissed by published opinion. Judge DUNCAN wrote the opinion, in which Judge WILKINSON and Judge AGEE joined.

OPINION
DUNCAN, Circuit Judge:
Kerney Ray Thornsbury pleaded guilty to being a felon in possession of ammunition, in violation of 18 U.S.C. §§ 922(g)(1) and 924(a)(2). As part of a plea agreement, Thornsbury waived his right to appeal "any sentence." During Thornsbury's subsequent incarceration, the government filed a motion pursuant to Federal Rule of Criminal Procedure 35(b), seeking to reduce his sentence in light of his assistance *534 to the government in prosecuting an unrelated case. The district court denied this motion, and Thornsbury appealed. Because we conclude that it is within the scope of Thornsbury's appellate waiver, we dismiss the appeal.

I.

A.
On October 2, 2009, Thornsbury was charged with possession of ammunition after having been convicted of a felony in violation of 18 U.S.C. §§ 922(g)(1) and 924(a)(2). Pursuant to a plea agreement, Thornsbury pleaded guilty to this charge on October 7, 2009. As part of this plea agreement, Thornsbury waived his appellate rights as follows:
Mr. Thornsbury knowingly and voluntarily waives his right to seek appellate review of any sentence of imprisonment or fine imposed by the District Court, or the manner in which the sentence was determined, on any other ground whatsoever including any ground set forth in 18 U.S.C. § 3742, so long as that sentence of imprisonment or fine is below or within the Sentencing Guideline range corresponding to offense level 20.
S.J.A. 5. The government similarly waived its right to appeal any sentence "within or above the Sentencing Guideline range corresponding to offense level 17." Id. Both Thornsbury and his counsel signed this agreement.
Before accepting Thornsbury's guilty plea, the district court, pursuant to Federal Rule of Criminal Procedure 11,[1] explained the terms of the appellate waiver, and questioned Thornsbury about his understanding of those terms. The district court asked if Thornsbury understood that, by agreeing to the waiver, he was giving up his right to "argue that certain errors may have taken place before the district court" should he be sentenced "within or below the guideline range corresponding with offense level 20." S.J.A. 28-29. Thornsbury responded that he understood. The district court further inquired whether Thornsbury had "reviewed the plea agreement in detail with [his] attorney." S.J.A. 30. Thornsbury responded that he had.
On March 25, 2010, the district court held a sentencing hearing. The district court first calculated a base offense level of 20. It then reduced the offense level to 17 as a result of Thornsbury's acceptance of responsibility. This offense level, applied to Thornsbury's criminal history category of II, yielded a sentencing guidelines range of 27 to 33 months. After analyzing the factors set forth in 18 U.S.C. § 3553(a), the district court sentenced Thornsbury to 33 months' imprisonment and three years of supervised release.[2]

B.
While incarcerated and awaiting sentencing, Thornsbury was assaulted and robbed by fellow inmates. In the ensuing investigation, Thornsbury provided assistance to the government, including testifying against the orchestrator of the attack, Alphonso Harper. As a result of this cooperation, Thornsbury was again assaulted by an associate of Harper.
*535 In return for his assistance in investigating Harper, the government, on May 31, 2011, filed a Motion to Reduce Sentence Pursuant to Rule 35. Rule 35 states, in relevant part, "Upon the government's motion... the court may reduce a sentence if the defendant, after sentencing, provided substantial assistance in investigating or prosecuting another person." Fed. R.Crim.P. 35(b)(1). After describing Thornsbury's assistance, the government noted that Thornsbury's "cooperation could continue to put him at risk while incarcerated" and concluded that Thornsbury "effectively assisted the United States in a significant case and that assistance should be rewarded." J.A. 51. The government recommended that Thornsbury's sentence be reduced to correspond to an "offense level [of] 16, which would result in a range of 24 to 30 months." Id. Thornsbury, through his counsel, filed a memorandum in support of the government's motion.
On August 4, 2011, the district denied the government's motion. The district court stated, in relevant part:
Defendant has served about twenty-nine (29) months of his thirty-three (33) month sentence and now seeks to have his sentence reduced by three (3) months due to his assistance to the Government. The nature of this assistance appears to be solely regarding matters in which he was the victim. While Defendant's safety is of concern, it does not override the Court's original consideration of the sentencing factors, particularly the seriousness of the offense, deterrence and public safety, set forth in 18 U.S.C. § 3553(a)....
Having carefully considered the Government's motion and its basis, Defendant's response, and having further reviewed the presentence investigation report, the Court finds that Defendant should not receive a reduction of his sentence under Rule 35. Accordingly, the Court ORDERS that the Motion of the United States to Reduce Defendant's Sentence Pursuant to Rule 35 of the Federal Rules of Criminal Procedure [Docket 92] be DENIED.
J.A. 60-61. Thornsbury filed a timely notice of appeal.

II.
On appeal, Thornsbury relies on our decision in United States v. Clawson, 650 F.3d 530 (4th Cir.2011), to challenge the method employed by the district court in deciding to deny the government's Rule 35(b) motion to reduce his sentence. Specifically, Thornsbury argues that the district court erred in denying the motion based on factors other than his assistance to government.[3] The government responds by challenging the substance of Thornsbury's argument, our jurisdiction to hear the appeal, and Thornsbury's right to bring the appeal. The government argues that the district court did not rely on non-assistance factors in denying its Rule 35(b) motion and, alternatively, argues both that this court lacks jurisdiction to hear the appeal, and that, in any case, Thornsbury affirmatively waived his right to appeal the denial.
We first examine our jurisdiction and then consider whether Thornsbury has waived his right to appeal this issue. Because we find the latter issue to be dispositive, *536 we do not consider the merits of the appeal.

A.
We turn first to an examination of our jurisdiction. The right to appeal is not a constitutional guarantee, but must instead be found in an applicable statute. Abney v. United States, 431 U.S. 651, 656, 97 S.Ct. 2034, 52 L.Ed.2d 651 (1977). In United States v. Pridgen, 64 F.3d 147, 149 (4th Cir.1995), we held that an appeal of "the decision of a district court to deny the Government's Rule 35(b) motion, and therefore to leave the previously imposed sentence undisturbed, is an appeal from an otherwise final sentence."
The circumstances in which a final sentence may be appealed are set out in 18 U.S.C. § 3742, which provides, in pertinent part, that a defendant may appeal a final sentence if it:
(1) was imposed in violation of law;
(2) was imposed as a result of an incorrect application of the sentencing guidelines; or
(3) is greater than the sentence specified in the applicable guideline range to the extent that the sentence includes a greater fine or term of imprisonment, probation, or supervised release than the maximum established in the guideline range, or includes a more limiting condition of probation or supervised release under section 3563(b)(6) or (b)(11) than the maximum established in the guideline range; or
(4) was imposed for an offense for which there is no sentencing guideline and is plainly unreasonable.
18 U.S.C. § 3742(a).
Thornsbury claims we have jurisdiction to hear his appeal pursuant to subsection (1) of § 3742(a). We agree. On appeal, Thornsbury contends that the district court violated Rule 35(b) by basing its decision to deny the government's motion on factors other than Thornsbury's assistance to the government. If Thornsbury is correct that a district court cannot base its decision to deny a Rule 35(b) motion on factors other than a defendant's assistance to the government and that the district court here considered such factors, then the district court acted contrary to Rule 35(b) in determining Thornsbury sentence, thus imposing a sentence "in violation of law." Such an appeal falls squarely under § 3742(a)(1).
In response, the government relies on our decision in Pridgen, which the government describes as containing a "plainly-stated ban on appeals of denials of Rule 35(b) motions." Appellee's Br. 12. Pridgen contains no such ban, plainly stated or otherwise. In Pridgen, we held that a defendant may not appeal "the merits of the decision of the district court not to" grant a Rule 35(b) motion. 64 F.3d at 150 (emphasis added). It is this holding on which the government focuses. But, importantly, in Pridgen, we went on to allow the defendant to challenge the denial of a Rule 35(b) motion on the basis that the district court improperly denied him an evidentiary hearing. See id. We reasoned that if the district court improperly denied Pridgen an evidentiary hearing, the resulting sentence would have been imposed in violation of Rule 35(b), and this possible violation of law provided us jurisdiction pursuant to § 3742(a)(1) to consider the evidentiary hearing issue on appeal. See id. In sum, we concluded that we had jurisdiction over that part of the appeal because it was not a challenge to the merits of the denial but rather a challenge to the lawfulness of the method used by the district court in reaching its decision. Thornsbury's appeal similarly challenges the lawfulness of the method used by the *537 district courti.e., considering non-assistance factorsin reaching its decision to deny the Rule 35(b) motion, and, accordingly, following Pridgen, we have jurisdiction to hear the appeal.[4]

B.
We next consider whether Thornsbury waived his right to appeal the district court's denial of the government's Rule 35(b) motion. We review the validity and effect of an appellate waiver de novo. United States v. General, 278 F.3d 389, 399 (4th Cir.2002). We generally "will enforce [a] waiver to preclude a defendant from appealing a specific issue if the record establishes that the waiver is valid and that the issue being appealed is within the scope of the waiver." United States v. Blick, 408 F.3d 162, 168 (4th Cir.2005) (citing United States v. Attar, 38 F.3d 727, 731-33 (4th Cir.1994)). An appellate waiver is valid if the defendant's agreement to the waiver was knowing and intelligent. Id. at 169.
Thornsbury makes two arguments as to why his appeal should not be dismissed pursuant to the waiver.[5] First, he argues that because "Rule 35(b) proceedings were never addressed in the plea agreement or plea hearing, [he] could not have knowingly and intelligently agreed to waive any rights related to them." Reply Br. 3. Second, he argues that, according to our precedent, appeals, like this one, that challenge a sentence as imposed in violation of law are categorically "outside the scope of otherwise valid appeal waivers." Reply Br. 4. We consider each of these arguments in turn.

1.
We first considerand rejectThornsbury's argument that because the possibility of a Rule 35(b) proceeding was not discussed at his allocution, he "could not have knowingly and intelligently agreed to waive any rights related" to such a proceeding. Reply Br. 3.
"[T]he law ordinarily considers a waiver knowing, intelligent, and sufficiently aware if the defendant fully understands the nature of the right and how it would likely apply in general in the circumstanceseven though the defendant may not know the specific detailed consequences of invoking it." United States v. Ruiz, 536 U.S. 622, 629, 122 S.Ct. 2450, 153 L.Ed.2d 586 (2002). To determine whether a waiver is knowing and intelligent, we examine "the totality of the circumstances, including the experience and conduct of the accused, as well as the accused's educational background and familiarity with the terms of the plea agreement." General, 278 F.3d at 400 (quotation marks omitted). Generally, if a district court questions a defendant regarding the waiver of appellate rights during the Rule 11 colloquy and the record indicates that the defendant understood the full significance of the waiver, the waiver is valid. United States v. Johnson, 410 F.3d 137, 151 (4th Cir.2005).
*538 Thornsbury does not dispute that he was competent to understand his plea agreement, including his appellate waiver. Thornsbury also does not dispute that he was aware he was waiving his right to appeal "any sentence." It is the law of this circuit after Pridgen that the denial of a Rule 35(b) motion is part of a defendant's sentence,[6] and it is undisputed that Thornsbury discussed the waiver with his attorney. Accordingly, by knowingly and intelligently waiving his right to appeal "any sentence," Thornsbury knowingly and intelligently waived his right to appeal the denial of a Rule 35(b) motion.
That the specific issue Thornsbury now appeals was not discussed at the Rule 11 hearing does not change our conclusion. To hold otherwise would be to accept Thornsbury's premise that a defendant can only knowingly and intelligently consent to waive his right to appeal those issues that are explicitly discussed at a Rule 11 hearing. Such a premise, however, finds no support in precedent, see Ruiz, 536 U.S. at 629, 122 S.Ct. 2450, and is in direct conflict with the very purpose of appellate waivers. Such waivers are valuable precisely because they cover unforeseen circumstances and thus add certainty to the criminal proceeding. See United States v. Poindexter, 492 F.3d 263, 270 (4th Cir.2007). Accepting Thornsbury's premise would make such certainty unattainable, as it is impossible to conceive oflet alone discuss at a hearingevery possible basis for appealing a sentence. This is why courts routinely hold defendants to appellate waivers, even for appeals of unforeseen issues. See, e.g., United States v. Johnson, 410 F.3d 137, 151-52 (4th Cir.2005); United States v. Roche, 415 F.3d 614, 617 (7th Cir.2005). Cf. United States v. Khattak, 273 F.3d 557, 561 (3d Cir.2001) ("Waivers of the legal consequences of unknown future events are commonplace.").
Moreover, "[a] plea agreement, like any contract, allocates risk." Johnson, 410 F.3d at 153. Here, Thornsbury assumed the risk of unforeseen legal errors involving his sentence, and in exchange, he received increased certainty regarding the length of that sentence. Allowing this bargain to be undone would undermine the value of appellate waivers and thus do lasting damage to criminal defendants like Thornsbury, who would lose much of the benefit of appellate waivers as a bargaining chip in the plea process. See United States v. Granik, 386 F.3d 404, 412 (2d Cir.2004) ("Knowing and voluntary appellate waivers included in plea agreements must be enforced because, if they are not, the covenant not to appeal becomes meaningless and would cease to have value as a bargaining chip in the hands of defendants." (quotation marks omitted)). Considering the totality of the circumstances, therefore, we conclude that Thornsbury's waiver was valid.

2.
Finally, we consider whether Thornsbury's appeal is within the scope of his appellate waiver. The scope of Thornsbury's waiver is quite broad. As noted above, Thornsbury waived his right to appeal "any sentence." S.J.A. 5. We have held that an appeal from a district court's decision on a Rule 35(b) motion is an appeal of the sentence at which the Rule 35(b) motion was aimed. See Pridgen, 64 F.3d at 149. Thus, Thornsbury is appealing "any sentence" as described in the waiver. Furthermore, Thornsbury's waiver explicitly covers appeals based on "any ground set forth in 18 U.S.C. § 3742." As noted in our discussion of *539 jurisdiction, the ground on which Thornsbury is appealing the district court's actions in denying the Rule 35(b) motion is that set forth in § 3742(a)(1), which allows for appeals challenging a sentence as "imposed in violation of law." See Reply Br. 4. We must conclude, therefore, that this appeal is within the scope of the waiver. See United States v. Emerson, 349 F.3d 986, 988 (7th Cir.2003) (holding that similarly broad language "must" bring within the scope of a waiver "appeals regarding reductions in sentence for cooperating with the government").
In the face of the plain language of the waiver, Thornsbury nonetheless argues that his appeal is outside its scope. He bases his argument on the fact that we have previously held that appeals challenging a sentence as "illegal" fall outside the scope of an otherwise effective waiver. Because Thornsbury challenges his sentence as "imposed in violation of law" claiming that the district court violated Rule 35(b) and Clawson by considering non-assistance factors in denying the government's motionhe contends that his appeal is of an illegal sentence and thus outside of the scope of the waiver. We disagree.
We have indeed used the term "illegal" to describe sentences the appeal of which survive an appellate waiver, but we have done so only where the sentence is alleged to have been beyond the authority of the district court to impose. See United States v. Broughton-Jones, 71 F.3d 1143, 1147 (4th Cir.1995) (using the term "illegal" to describe a district court's imposition of restitution in the absence of authority to do so); United States v. Sims, 410 Fed.Appx. 666, 669-70 (4th Cir.2011) (unpublished) (using the term "illegal" in allowing an appeal challenging the authority of the district court to order sex offender registration). In contrast, sentences "imposed in violation of law" include not only "illegal" sentences, as just described, but also any sentence that has been touched by a legal error. In other words, not every appeal alleging a legal error in sentencing challenges that sentence as "illegal," as we have used the term in our precedent. Were we to hold otherwise, it is difficult to conceive of a limiting principle that would prevent the "illegal" sentence exception from swallowing the rule that appellate waivers are normally given effect, since nearly every appeal of a sentence involves a claim of legal error. See United States v. Smith, 500 F.3d 1206, 1213 (10th Cir.2007) ("To allow alleged errors in computing a defendant's sentence to render a waiver unlawful would nullify the waiver based on the very sort of claim it was intended to waive."). Such a holding would also be contrary to precedent. See, e.g., General, 278 F.3d at 399-400 (enforcing waiver and dismissing challenge to sentences based on numerous errors); United States v. Marin, 961 F.2d 493, 496 (4th Cir.1992) (enforcing waiver and dismissing appeal resting on complaints of "an improper application of the guidelines and a violation of a procedural rule").
We instead view challenges to a sentence as "illegal" as those involving much more fundamental issuessuch as challenges claiming a district court exceeded its authority, claiming that a sentence was based on a constitutionally impermissible factor such as race, or claiming a post-plea violation of the right to counsel. See Marin, 961 F.2d at 496 (noting the first two possibilities); Attar, 38 F.3d at 732-33 (noting the last possibility).[7] Thornsbury *540 does not allege any such circumstances. Accordingly, we conclude that we must give Thornsbury's waiver effect and dismiss his appeal.

III.
For the foregoing reasons, Thornsbury's appeal is
DISMISSED.
NOTES
[1]  Rule 11 sets forth the procedures for accepting a defendant's guilty plea. Among other things, Rule 11 requires the district court to "inform the defendant of, and determine that the defendant understands ... the terms of any plea-agreement provision waiving the right to appeal." Fed.R.Crim.P. 11(b)(1).
[2]  We affirmed Thornsbury's sentence on appeal. United States v. Thornsbury, 410 Fed. Appx. 727 (4th Cir.2011).
[3]  In Clawson, we held "that the district court exceeded its authority under Rule 35(b) by granting the motion based on factors other than the defendant's cooperation with the government." 650 F.3d at 537 (emphasis added). We had no occasion to decide whether a district court could consider non-assistance factors in denying a Rule 35(b) motion.
[4]  Furthermore, all other courts of appeals to have considered this precise issue have concluded that jurisdiction exists. See, e.g., United States v. Chapman, 532 F.3d 625, 628-29 (7th Cir.2008) (holding that jurisdiction existed under § 3742(a)(1) to hear a Rule 35(b) appeal where defendants argued "that the district court ... considered factors that it should not have considered"); United States v. Grant, 636 F.3d 803, 809 (6th Cir.2011) (en banc) (same); United States v. Doe, 351 F.3d 929, 932 (9th Cir.2003) (same); United States v. Manella, 86 F.3d 201, 203 (11th Cir.1996) (same).
[5]  Thornsbury does not dispute that the condition of his waiverbeing sentenced within or below the guidelines range corresponding to an offense level of 20was satisfied.
[6]  "All citizens are presumptively charged with knowledge of the law." Atkins v. Parker, 472 U.S. 115, 130, 105 S.Ct. 2520, 86 L.Ed.2d 81 (1985).
[7]  Other circuits refer to these circumstances generally as a "miscarriage[s] of justice" that justify ignoring an otherwise valid waiver. See, e.g., United States v. Polly, 630 F.3d 991, 1001 (10th Cir.2011); United States v. Teeter, 257 F.3d 14, 25 n. 9, n. 10 (1st Cir.2001).
