Question: I get this really bad feedback sounding noise when I play stuff like this, from the beginning of the Free Bird solo, 
shown in tab:

```
1  ----18---18---18---------
2  -18---18---18---------

```

(All notes on second string played with a full bend.)

It's there on any amount of distortion, but not when I play clean. Is it a problem with the amp? If so, what can I do about it?

Answer: 
Looks like you have a little 10 Watt practice amp with a 6.5" speaker. I'm going to be straight honest with you: you may not be able to get rid of this issue. Harmonic feedback as I know it has a lot to do with volume. For example, you could have an amp gained out to obscene levels but at a low volume and never cause any harmonic feedback--so feedback isn't necessarily as much of a relationship with gain as it is with volume and gain. If I were to describe it as a function I would say that the amount of harmonic feedback = f(volume, gain) where volume and gain are variable to some degree but proportional.

So after explaining feedback a little, let's address your problem. I don't necessarily think that you are hearing any harmonic feedback in this case--but it's more likely that you are detecting some dissonance or artifacts in the sound produced from your amp. Practice amplifiers are built to be just that. A 6.5" speaker can get pretty loud mind you--I used to piss off the neighbors with my little Fender Champ--but it's not terribly good at reproducing the frequency range of a guitar; specifically an overdriven guitar. Overdrive results in a lot of higher order harmonics jumping out of the sound, and my guess is your little amp speaker simply cannot properly reproduce the overdrive as it should be. You're likely hearing a bit of dissonance (as AbstractDissonance and Alistair both pointed out).

Since the practice amplifier you named is solid state, I highly doubt any of the components in the tone stack or amp circuitry are on the fritz. Even cheaply built (please take no offense) solid state components can last a pretty long time assuming they are built within manufacturing tolerances.

There are also many, many additional factors that could be potentially causing the problem, but this is my best guess based on the information that I have currently. If you want to help us out further you could post some audio clips of the amplifier on overdriven and clean channels so that we can A/B them. Alternatively, if you're up to it, you could even post a quick video of your gear rundown and produce the problem on the spot. Those pieces would make it a whole lot easier to completely troubleshoot your issue, but right now I've given you my best shot :D.
This could be a number of problems. 

1. Dissonance: This, in basic terms, is when two notes do not sound good together, and clash producing an unpleasant noise. However I have tried this out on my guitar and amp and I do not get any dissonance, so it may not be that.
2. Amp/Speaker Problems: I have found, particularly with Line 6 Amps and Speakers, that when the bass and mid knobs are turned very high, the speaker cannot cope very well and produces and grinding feedbacky boom.
3. Tuning problems: It may sound stupid and patronising of me, but are you perfectly in tune? According to both ear and tuner? If so, your guitar's intonation may be out. Any slight fault in an intonation setup causes the guitar to be out of tune with itself, and therefore notes that usually harmonise well may suddenly sound dissonant. This is greatly accentuated at higher frets, where strings will sound even worse if the intonation is out.
[See this previous question](https://music.stackexchange.com/questions/1604/what-is-intonation-and-how-can-i-find-out-if-my-guitar-has-correct-intonation) for help about intonation.

Distortion greatly increases the unpleasant dissonant sound, so that may explain why you do not find you have the problem on a clean setting. 

Hope this helps.